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


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

Example response (200):


{
    "data": [
        {
            "id": "a47865ce-3d9f-3bef-ac57-435f7273474b",
            "name": "iusto-6a6d07c39889c",
            "display_name": "Quasi eos corrupti voluptas amet beatae saepe.",
            "permissions_count": null
        },
        {
            "id": "9f801a28-b9e5-3978-ab2c-3a4d5cd7900f",
            "name": "aliquid-6a6d07c39c403",
            "display_name": "Sint quos eius nesciunt temporibus consectetur amet voluptatem.",
            "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 8h6d6vE1egVkc34ZabD5Paf

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 Ead6kVP5bDae4c3hfg8vZ16" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"d9871b00-56c1-3781-a4c4-49c1d7199774\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "d9871b00-56c1-3781-a4c4-49c1d7199774"
    ]
};

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 Ead6kVP5bDae4c3hfg8vZ16

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 6h3agaP6dE58VeZvbcfD1k4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"bdf3a16f-0e84-3b59-9f08-06959ff251a2\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "bdf3a16f-0e84-3b59-9f08-06959ff251a2"
    ]
};

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

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


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

Example response (200):


{
    "data": {
        "id": "f4af82fc-cf5f-374a-8e6a-6306160cc2c5",
        "name": "nisi-6a6d07c3aba86",
        "display_name": "Aspernatur velit eos dolores quis nihil.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer 1eZak6356vgaV4fEDdh8Pbc

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "doloribus",
            "display_name": "Minima commodi est voluptas quo voluptate nesciunt laborum."
        },
        {
            "id": null,
            "name": "autem",
            "display_name": "Quia illum rerum soluta rem dolorem est consectetur porro."
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer 64Z3gaefP8kbEv5chd6aVD1

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

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 E43dcb5Vav1eahgZPf6D86k" \
    --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 E43dcb5Vav1eahgZPf6D86k",
    "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": "Explicabo rerum et natus et impedit nam."
        },
        {
            "id": null,
            "name": "illo",
            "display_name": "Natus corporis ut totam eos."
        }
    ],
    "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 E43dcb5Vav1eahgZPf6D86k

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

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "name": "odio",
        "display_name": "Blanditiis ratione perferendis at officiis quisquam quo necessitatibus."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer V1hc6kaf3ZbvegD8Pa5d4E6

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "129342c9-1d89-35d4-a77b-be995e8b3468",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 4181.52,
            "due_date": "2026-08-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": "Et illum qui ratione ex velit sit a.",
            "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": "accusamus",
            "field2": 100,
            "field3": false,
            "notes": "Ut quod blanditiis non magnam hic neque.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "3a41b447-7045-37e4-9601-9882fc0fa3d2",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 1089.65,
            "due_date": "2026-08-21T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Dolorem magni iure enim fuga nihil vel harum.",
            "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": "unde",
            "field2": 28,
            "field3": true,
            "notes": "Magnam porro molestiae fugit voluptate sint.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer EP3861654bZVeaaDcdkgfhv

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

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

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

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[]=sit&suppliers[]=eos&works[]=qui&statuses[]=cancelado&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-07-31T17%3A38%3A27&protest_date_end=2026-07-31T17%3A38%3A27&has_protest=&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer 8ePVaf4D5ac3vdZEgh16b6k" \
    --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]": "sit",
    "suppliers[0]": "eos",
    "works[0]": "qui",
    "statuses[0]": "cancelado",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-07-31T17:38:27",
    "protest_date_end": "2026-07-31T17:38:27",
    "has_protest": "0",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "74f2c957-626c-3969-8605-fc4dc6d2afd5",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 6604.63,
            "due_date": "2026-08-11T03: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 maiores non optio qui iste harum numquam a consectetur et alias.",
            "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": "eum",
            "field2": 62,
            "field3": true,
            "notes": "Delectus sequi ut voluptas non eveniet.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "cbfec8a2-384c-3778-920a-804b0f287aab",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 9803.84,
            "due_date": "2026-08-11T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Quia omnis molestiae eos consectetur impedit et corporis veritatis est nulla quo.",
            "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": 68,
            "field3": false,
            "notes": "Aut et in ex. Id ut rerum earum sed rerum.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/accounts-payable-receivable/protests

Headers

Authorization        

Example: Bearer 8ePVaf4D5ac3vdZEgh16b6k

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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

Payment method. Example: cheque

Must be one of:
  • cheque
  • boleto
  • 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-07-31T17:38:27

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-31T17:38:27

has_protest   boolean  optional    

Example: false

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

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

List accounts payable receivable

requires authentication accounts-payable-receivable index

List all accounts payable receivable

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable?sort_by=created_at&sort_desc=1&page=1&per_page=10&q=Salary&code=CPR-000123&type=entrada&customers[]=hic&suppliers[]=aspernatur&works[]=eligendi&statuses[]=pago_sem_lancamento&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-07-31T17%3A38%3A27&protest_date_end=2026-07-31T17%3A38%3A27&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer PekDvfh1ac6b4daE53gZ86V" \
    --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]": "hic",
    "suppliers[0]": "aspernatur",
    "works[0]": "eligendi",
    "statuses[0]": "pago_sem_lancamento",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-07-31T17:38:27",
    "protest_date_end": "2026-07-31T17:38:27",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "e75d4c07-c895-3492-9634-2c7b024c4b9a",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 5654.96,
            "due_date": "2026-08-28T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Enim et error id velit consequatur quaerat illum totam id et consequuntur.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "quod",
            "field2": 15,
            "field3": false,
            "notes": "Cumque dolorum et quia sit sed illo vero.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f563169c-5908-31e6-8f42-25bce4b7400c",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 9801.52,
            "due_date": "2026-08-13T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Aut minima ut atque pariatur aut saepe qui.",
            "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": "sequi",
            "field2": 32,
            "field3": false,
            "notes": "Voluptatem esse aut quo in 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/accounts-payable-receivable

Headers

Authorization        

Example: Bearer PekDvfh1ac6b4daE53gZ86V

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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

Payment method. Example: cheque

Must be one of:
  • cheque
  • boleto
  • 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-07-31T17:38:27

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-31T17:38:27

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 6VvP4613hgdbkcea8ZED5af" \
    --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\": \"4d3e9e2d-7106-3b08-b95d-53bd103103ff\",
    \"customer_id\": \"84192fdf-0360-3c99-af0c-cfac9b8a45f2\",
    \"work_id\": \"bd50cbf5-acf9-3db2-a83e-8dfeae81c50e\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"752cb8b9-8def-35e8-95c4-c3746697638a\",
    \"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 6VvP4613hgdbkcea8ZED5af",
    "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": "4d3e9e2d-7106-3b08-b95d-53bd103103ff",
    "customer_id": "84192fdf-0360-3c99-af0c-cfac9b8a45f2",
    "work_id": "bd50cbf5-acf9-3db2-a83e-8dfeae81c50e",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "752cb8b9-8def-35e8-95c4-c3746697638a",
    "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 6VvP4613hgdbkcea8ZED5af

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
  • 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: 4d3e9e2d-7106-3b08-b95d-53bd103103ff

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: 84192fdf-0360-3c99-af0c-cfac9b8a45f2

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: bd50cbf5-acf9-3db2-a83e-8dfeae81c50e

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: 752cb8b9-8def-35e8-95c4-c3746697638a

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

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

let body = {
    "fiscal_document_id": "nobis",
    "installment_ids": [
        "molestiae"
    ],
    "payment_method": "outro",
    "work_id": "explicabo"
};

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 PaDebVf86h4g31d5akcEZ6v

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

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
  • outro
work_id   string  optional    

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: sit

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

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


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

Example response (200):


{
    "data": {
        "id": "ce052709-bcc4-3f25-b5b6-03084d3489c1",
        "code": null,
        "type": "saída",
        "payment_method": "cheque",
        "amount": 4945.53,
        "due_date": "2026-08-29T03: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": "Suscipit aspernatur rerum sunt omnis id nihil nihil omnis nulla maxime.",
        "is_recurring": null,
        "recurrence_config": null,
        "parent_id": null,
        "recurrence_order": 1,
        "total_recurrences": null,
        "children_count": 0,
        "remaining_recurrences": null,
        "has_children": false,
        "field1": "porro",
        "field2": 40,
        "field3": true,
        "notes": "Ut nam repudiandae voluptatem.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer Egfk6ahd41ZDc6v38abeVP5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: eos

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/veritatis" \
    --header "Authorization: Bearer b5ekDaZ1fv6gaP3Ec4dh8V6" \
    --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\": \"cadacb00-963d-3dfe-a00b-242da47c8721\",
    \"customer_id\": \"e306d385-4000-3844-b64c-63f30d7e3fbe\",
    \"work_id\": \"bbe39468-249b-3ece-ace4-30724d39aee9\",
    \"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\": \"313220d7-987d-3a86-bb83-67bc50bf5632\",
    \"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/veritatis"
);

const headers = {
    "Authorization": "Bearer b5ekDaZ1fv6gaP3Ec4dh8V6",
    "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": "cadacb00-963d-3dfe-a00b-242da47c8721",
    "customer_id": "e306d385-4000-3844-b64c-63f30d7e3fbe",
    "work_id": "bbe39468-249b-3ece-ace4-30724d39aee9",
    "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": "313220d7-987d-3a86-bb83-67bc50bf5632",
    "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 b5ekDaZ1fv6gaP3Ec4dh8V6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: veritatis

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
  • 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: cadacb00-963d-3dfe-a00b-242da47c8721

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: e306d385-4000-3844-b64c-63f30d7e3fbe

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: bbe39468-249b-3ece-ace4-30724d39aee9

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: 313220d7-987d-3a86-bb83-67bc50bf5632

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: molestiae

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

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

let body = {
    "email": "demarcus.bode@example.org",
    "password": "password"
};

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

Example response (200):


{
    "token": "string"
}
 

Request      

POST api/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Example: demarcus.bode@example.org

password   string     

User password. Example: password

Me

requires authentication No specific permission required

Get the current user

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


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

Example response (200):


{
    "data": {
        "id": "8e237ed1-4491-3a84-bda1-5699d7f5c635",
        "name": "Jayda Cormier",
        "username": "della.fahey",
        "email": "kevon.gutmann@example.org",
        "ability": [
            {
                "action": "read",
                "subject": "Auth"
            },
            {
                "action": "listar",
                "subject": "padrão"
            }
        ],
        "roles": [],
        "preferences": [],
        "sectors": [],
        "image": {
            "id": null,
            "url": null
        }
    }
}
 

Request      

GET api/auth/user

Headers

Authorization        

Example: Bearer 36fkP5Dh6EVeZa14gavc8db

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 edZfb8g51PD6aEhc3a64Vvk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"dicki.princess\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"31c8af3e-4b92-3aa9-a429-ab6fb22d2e25\"
    ],
    \"roles\": [
        \"c250d9af-4679-31e3-a041-be75715bc311\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "dicki.princess",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "31c8af3e-4b92-3aa9-a429-ab6fb22d2e25"
    ],
    "roles": [
        "c250d9af-4679-31e3-a041-be75715bc311"
    ]
};

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 edZfb8g51PD6aEhc3a64Vvk

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: dicki.princess

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 63gPcd5a1kfDa84EVZhe6bv" \
    --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 63gPcd5a1kfDa84EVZhe6bv",
    "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 63gPcd5a1kfDa84EVZhe6bv

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 14eEPaf5dDV6c8hZgvb3k6a" \
    --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 14eEPaf5dDV6c8hZgvb3k6a",
    "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 14eEPaf5dDV6c8hZgvb3k6a

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: aliquid

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: suscipit

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 15

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/19/withdraw" \
    --header "Authorization: Bearer 66Ve5EdfhgPk3aacbDv481Z" \
    --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/19/withdraw"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 19

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 16a3d4PbhavekVZcE65fD8g" \
    --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 16a3d4PbhavekVZcE65fD8g",
    "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 16a3d4PbhavekVZcE65fD8g

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


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

Example response (200):


{
    "data": {
        "id": "ab96cb5d-abf1-3683-bf12-76fc0d75f3b7",
        "agency": "6059",
        "account": "9905428-1",
        "type": "caixa",
        "balance": 7255.42,
        "holder_type": "pf",
        "alias": "ut",
        "limit": 9784.87,
        "available_balance": 17040.29,
        "used_limit": 0,
        "available_limit": 9784.87,
        "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 a6vZaDbc6dkgEP38V54h1fe

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


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

Example response (200):


{
    "data": [
        {
            "id": "2d3ec404-1596-3d13-b977-afaf20c8d06e",
            "agency": "2869",
            "account": "6433324-2",
            "type": "poupança",
            "balance": 6863.31,
            "holder_type": "pj",
            "alias": "eaque",
            "limit": 8565.45,
            "available_balance": 15428.760000000002,
            "used_limit": 0,
            "available_limit": 8565.45,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "162dd4ab-b5f4-35c3-97e0-c826af6de577",
            "agency": "4749",
            "account": "9383386-3",
            "type": "caixa",
            "balance": 3118.66,
            "holder_type": "pj",
            "alias": "modi",
            "limit": 282.81,
            "available_balance": 3401.47,
            "used_limit": 0,
            "available_limit": 282.81,
            "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 ck1Vhe4vD3Z6d6gE8Pafba5

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 haEafd1e63vVkPcb468gZD5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"1616874-7\",
    \"bank_id\": \"40e5edab-dacb-30ef-ba67-ca4d37df31cb\",
    \"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 haEafd1e63vVkPcb468gZD5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "1616874-7",
    "bank_id": "40e5edab-dacb-30ef-ba67-ca4d37df31cb",
    "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 haEafd1e63vVkPcb468gZD5

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 1616874-7

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: 40e5edab-dacb-30ef-ba67-ca4d37df31cb

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/2" \
    --header "Authorization: Bearer cEk3v8g4fe6aZ1hdPbDV56a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"1017327-1\",
    \"bank_id\": \"42c02f9a-04e6-37ee-afcd-29a0faae1e37\",
    \"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/2"
);

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

let body = {
    "agency": "Example Agency",
    "account": "1017327-1",
    "bank_id": "42c02f9a-04e6-37ee-afcd-29a0faae1e37",
    "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 cEk3v8g4fe6aZ1hdPbDV56a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 2

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 1017327-1

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: 42c02f9a-04e6-37ee-afcd-29a0faae1e37

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

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


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

Example response (200):


{
    "data": {
        "id": "6e017fd6-e593-35f1-b6e6-051db417fe9d",
        "agency": "3749",
        "account": "5396583-1",
        "type": "poupança",
        "balance": 9339.88,
        "holder_type": "pf",
        "alias": "enim",
        "limit": 1940.03,
        "available_balance": 11279.91,
        "used_limit": 0,
        "available_limit": 1940.03,
        "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 4VaZD3ace1dgPE6k65vfh8b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 17

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 15

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 4

Body Parameters

date_start   string  optional    

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

date_end   string  optional    

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

List bank statements

requires authentication bank-statement index

List statements for a bank account. Default period: last 30 days.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/2/statements" \
    --header "Authorization: Bearer abfd64a81Z63gPkhDcve5VE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"cumque\",
    \"sort_desc\": false,
    \"page\": 40,
    \"per_page\": 21,
    \"q\": \"arxvbicfxtvwqflvi\",
    \"type\": \"saída\",
    \"date_start\": \"2026-07-31T17:38:28\",
    \"date_end\": \"2081-05-23\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/2/statements"
);

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

let body = {
    "sort_by": "cumque",
    "sort_desc": false,
    "page": 40,
    "per_page": 21,
    "q": "arxvbicfxtvwqflvi",
    "type": "saída",
    "date_start": "2026-07-31T17:38:28",
    "date_end": "2081-05-23"
};

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 abfd64a81Z63gPkhDcve5VE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 2

Body Parameters

sort_by   string  optional    

Example: cumque

sort_desc   boolean  optional    

Example: false

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

type   string  optional    

Example: saída

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

O campo value deve ser uma data válida. Example: 2026-07-31T17:38:28

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: 2081-05-23

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 20

bankStatement   string     

Example: numquam

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


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

Example response (200):


{
    "data": [
        {
            "id": "5da8ff14-2684-34eb-b349-4da32f28f5c7",
            "name": "Serra e Cortês e Associados",
            "code": "650"
        },
        {
            "id": "da6bd226-c6a1-38d5-92f8-b7c49bbe3efd",
            "name": "Martines e Correia Ltda.",
            "code": "841"
        }
    ],
    "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 vafZVPD5g3d4ecb8ahEk166

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

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

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


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

Example response (200):


{
    "data": {
        "id": "31bdb634-3d42-3228-81fb-609dddb7d743",
        "name": "Guerra e Teles Ltda.",
        "code": "95"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer E5hdZPakev4Dgfa613bV8c6

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 63dVE84P6k1faDebvZhga5c" \
    --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 63dVE84P6k1faDebvZhga5c",
    "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 63dVE84P6k1faDebvZhga5c

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

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=Odio+sunt+saepe+quasi+porro+molestiae+saepe+qui.&categories[]=rerum&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ipsam&customers[]=cupiditate&suppliers[]=atque&works[]=temporibus" \
    --header "Authorization: Bearer hgZ86VdkceaEaf1D4v35P6b" \
    --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": "Odio sunt saepe quasi porro molestiae saepe qui.",
    "categories[0]": "rerum",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "ipsam",
    "customers[0]": "cupiditate",
    "suppliers[0]": "atque",
    "works[0]": "temporibus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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: Odio sunt saepe quasi porro molestiae saepe qui.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

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

date_end   string  optional    

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

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

List cash flow

requires authentication cash-flow index

List all cash flow

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cash-flows?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Salary&cash_session=uuid&type=entrada&description=Omnis+nihil+porro+qui+facilis+temporibus.&categories[]=quaerat&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=officiis&customers[]=accusantium&suppliers[]=dolorem&works[]=et" \
    --header "Authorization: Bearer k8Z1fce5agvP6E43hdDabV6" \
    --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": "Omnis nihil porro qui facilis temporibus.",
    "categories[0]": "quaerat",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "officiis",
    "customers[0]": "accusantium",
    "suppliers[0]": "dolorem",
    "works[0]": "et",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "2031ce64-cb74-3aa4-8972-e1cd03cf0782",
            "code": "FC-66862017",
            "type": "saque",
            "amount": -512.01,
            "description": "Qui ut asperiores sapiente ut deserunt iusto neque.",
            "transaction_date": "2008-05-27T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d9b02489-030a-3a37-8abb-766f59eca133",
            "code": "FC-73803423",
            "type": "saque",
            "amount": -6822.19,
            "description": "Praesentium in neque ea voluptatem labore ad qui.",
            "transaction_date": "2018-05-16T03: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 k8Z1fce5agvP6E43hdDabV6

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: Omnis nihil porro qui facilis temporibus.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

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

date_end   string  optional    

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

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

Create cash flow

requires authentication cash-flow store

Create a new cash flow

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/cash-flows" \
    --header "Authorization: Bearer gcEbavD1fV3e66aZh854dPk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"9ae7d220-2206-3d68-929a-77003144ee10\",
    \"transaction_category_id\": \"f0801d41-2f07-3445-b109-86d3c12701e9\",
    \"bank_account_id\": \"45da9d2d-ddb7-3f79-819b-ef097db5109d\",
    \"customer_id\": \"804b100f-a281-3da7-a4b1-dea7e68a8972\",
    \"supplier_id\": \"52513ad6-7836-3a20-bb42-7a5c2daac782\",
    \"work_id\": \"75f1f7b5-0a92-3159-9962-8034b0275129\",
    \"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 gcEbavD1fV3e66aZh854dPk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "9ae7d220-2206-3d68-929a-77003144ee10",
    "transaction_category_id": "f0801d41-2f07-3445-b109-86d3c12701e9",
    "bank_account_id": "45da9d2d-ddb7-3f79-819b-ef097db5109d",
    "customer_id": "804b100f-a281-3da7-a4b1-dea7e68a8972",
    "supplier_id": "52513ad6-7836-3a20-bb42-7a5c2daac782",
    "work_id": "75f1f7b5-0a92-3159-9962-8034b0275129",
    "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 gcEbavD1fV3e66aZh854dPk

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: 9ae7d220-2206-3d68-929a-77003144ee10

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: f0801d41-2f07-3445-b109-86d3c12701e9

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 45da9d2d-ddb7-3f79-819b-ef097db5109d

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 804b100f-a281-3da7-a4b1-dea7e68a8972

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 52513ad6-7836-3a20-bb42-7a5c2daac782

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 75f1f7b5-0a92-3159-9962-8034b0275129

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

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


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

Example response (200):


{
    "data": {
        "id": "a21dfe62-f99d-3c7b-a698-7f108ab46a6e",
        "code": "FC-69650457",
        "type": "saída",
        "amount": -6877.32,
        "description": "Dolor vero nisi quis.",
        "transaction_date": "1982-06-05T03: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 b5dZc6khv4gaD1ef3E8VPa6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 12

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/3" \
    --header "Authorization: Bearer 8v6bP5fdh4Ecge6aZkV1Da3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"320b5721-cba3-367c-8a7c-42ddd223ee0e\",
    \"transaction_category_id\": \"fa3f2f9f-4b1c-3463-96f2-7f9d90d78acb\",
    \"bank_account_id\": \"a1ea516f-0d62-30fc-9f79-886d5f86c0d8\",
    \"customer_id\": \"b877d253-d386-36bb-bbb3-1b7ee8b6ad70\",
    \"supplier_id\": \"2ba2a836-e812-307f-b209-6fc92a49a000\",
    \"work_id\": \"188e8340-3238-38d1-b53d-d69d09de3743\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/3"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "320b5721-cba3-367c-8a7c-42ddd223ee0e",
    "transaction_category_id": "fa3f2f9f-4b1c-3463-96f2-7f9d90d78acb",
    "bank_account_id": "a1ea516f-0d62-30fc-9f79-886d5f86c0d8",
    "customer_id": "b877d253-d386-36bb-bbb3-1b7ee8b6ad70",
    "supplier_id": "2ba2a836-e812-307f-b209-6fc92a49a000",
    "work_id": "188e8340-3238-38d1-b53d-d69d09de3743",
    "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 8v6bP5fdh4Ecge6aZkV1Da3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 3

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: 320b5721-cba3-367c-8a7c-42ddd223ee0e

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: fa3f2f9f-4b1c-3463-96f2-7f9d90d78acb

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: a1ea516f-0d62-30fc-9f79-886d5f86c0d8

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: b877d253-d386-36bb-bbb3-1b7ee8b6ad70

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 2ba2a836-e812-307f-b209-6fc92a49a000

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 188e8340-3238-38d1-b53d-d69d09de3743

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/5" \
    --header "Authorization: Bearer fZaDve56Vd4hEg6Pckab183" \
    --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 fZaDve56Vd4hEg6Pckab183",
    "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 fZaDve56Vd4hEg6Pckab183

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 5

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


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

Example response (200):


{
    "data": [
        {
            "id": "305edf80-bdf4-3bbf-82a1-4f6ebca63d98",
            "code": null,
            "opened_by": null,
            "opened_at": "1982-06-14T20:00:47.000000Z",
            "closed_by": null,
            "closed_at": "1989-01-25T14:55:38.000000Z",
            "opening_balance": 9049.23,
            "closing_balance": 9283.4,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Aberto",
            "hasSnapshot": false,
            "created_at": "1970-04-01T07:25:10.000000Z",
            "updated_at": "1999-05-22T01:04:08.000000Z"
        },
        {
            "id": "50fd877b-5f10-387b-acbd-10413fa5dcad",
            "code": null,
            "opened_by": null,
            "opened_at": "2000-07-26T11:38:17.000000Z",
            "closed_by": null,
            "closed_at": "1984-01-14T19:04:38.000000Z",
            "opening_balance": 703.24,
            "closing_balance": 4993.8,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "1990-01-14T17:00:59.000000Z",
            "updated_at": "1986-06-20T05:50:03.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 4e6Z1PgcaVh3bavE86d5fDk

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


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

Example response (200):


{
    "data": {
        "id": "84ba01ed-a2d6-32b9-bc3b-6c4e2224d1b9",
        "code": null,
        "opened_by": null,
        "opened_at": "1988-12-05T07:55:11.000000Z",
        "closed_by": null,
        "closed_at": "1998-08-28T05:58:38.000000Z",
        "opening_balance": 2970.26,
        "closing_balance": 5470.03,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "2005-12-02T07:15:21.000000Z",
        "updated_at": "2023-11-23T08:01:48.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer a54Zgdca3bDkP8v6Vh6Ee1f

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/f32ab42e-8447-3623-9e81-5b220d8dfbfa" \
    --header "Authorization: Bearer aDEg48c5ak6eZ3bvhfVdP61" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/f32ab42e-8447-3623-9e81-5b220d8dfbfa"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: f32ab42e-8447-3623-9e81-5b220d8dfbfa

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/a553c419-6e90-3d10-855a-8e09ee6a55bb/account-snapshot" \
    --header "Authorization: Bearer h1dbZgfkE846V5c6evDa3Pa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/a553c419-6e90-3d10-855a-8e09ee6a55bb/account-snapshot"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: a553c419-6e90-3d10-855a-8e09ee6a55bb

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/df3629ee-ae27-35e4-a58b-6435cb4cbb22" \
    --header "Authorization: Bearer v5dDb6eaEf3PVa6kgch418Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/df3629ee-ae27-35e4-a58b-6435cb4cbb22"
);

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


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

Example response (200):


{
    "data": {
        "id": "13b25536-58b8-3983-b8ae-0102ce87302b",
        "code": null,
        "opened_by": null,
        "opened_at": "1979-11-18T10:38:57.000000Z",
        "closed_by": null,
        "closed_at": "1971-07-29T01:29:44.000000Z",
        "opening_balance": 3828.45,
        "closing_balance": 2706.94,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "hasSnapshot": false,
        "created_at": "1987-07-05T20:33:17.000000Z",
        "updated_at": "1986-11-26T07:17:43.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer v5dDb6eaEf3PVa6kgch418Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: df3629ee-ae27-35e4-a58b-6435cb4cbb22

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/26a2f5f4-d66f-3890-9b5a-7103f090942f" \
    --header "Authorization: Bearer dP8c4366gakfZvahbEeDV51" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/26a2f5f4-d66f-3890-9b5a-7103f090942f"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 26a2f5f4-d66f-3890-9b5a-7103f090942f

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 egZbkv6Dc41af5h6VP38daE" \
    --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\": \"c2f5a077-bf61-3b84-9342-b2ba408dc0b3\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts"
);

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

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "c2f5a077-bf61-3b84-9342-b2ba408dc0b3"
};

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

Example response (200):


{
    "data": [
        {
            "id": "c8d472d3-fb00-3af3-85f8-a01dfa34295f",
            "number": "035/2026",
            "started_at": "2026-07-31",
            "deadline_at": "2027-07-31",
            "work": {
                "id": "a2649dfa-bb0a-40ee-8625-31704fb79cff",
                "name": "Martinho Padrão Sobrinho"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "73550c1d-e863-314d-93f2-23688234b2f8",
            "number": "707/2026",
            "started_at": "2026-07-31",
            "deadline_at": "2027-07-31",
            "work": {
                "id": "a2649dfa-c27f-44ed-8de6-eb0fb7652d66",
                "name": "Leandro Esteves Filho"
            },
            "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 egZbkv6Dc41af5h6VP38daE

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: c2f5a077-bf61-3b84-9342-b2ba408dc0b3

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 fkVd65v8hZeg61aDEPcb34a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_id\": \"76422daa-b17b-316c-ba00-35fb94c4c19a\",
    \"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 fkVd65v8hZeg61aDEPcb34a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_id": "76422daa-b17b-316c-ba00-35fb94c4c19a",
    "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 fkVd65v8hZeg61aDEPcb34a

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: 76422daa-b17b-316c-ba00-35fb94c4c19a

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

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


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

Example response (200):


{
    "data": {
        "id": "d0c00b00-04e2-3e3a-9a73-946b7bb15731",
        "number": "991/2026",
        "started_at": "2026-07-31",
        "deadline_at": "2027-07-31",
        "work": {
            "id": "a2649dfa-ce80-45c4-b975-89b16659a75e",
            "name": "Jasmin Espinoza Salas"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/contracts/{id}

Headers

Authorization        

Example: Bearer hf4a3vek8a1Z5E6VPD6bdgc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 12

contract   string     

Contract UUID Example: dolor

Update contract

requires authentication contract update

Update a work contract

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 6

contract   string     

Contract UUID Example: accusantium

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contract   string     

Contract UUID Example: vero

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


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

Example response (200):


{
    "data": [
        {
            "id": "474de3ed-15bc-3797-81f7-670e7b1b2a9a",
            "name": "Srta. Lúcia Cristiana Mendonça Jr.",
            "email": "itoledo@example.org",
            "phone": "(74) 99367-1978",
            "document": "610.979.288-88",
            "type": "pj",
            "responsible": "Srta. Caroline Flores Marés Neto",
            "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": "174690c3-331c-3443-9ac1-f377f81ad6bb",
            "name": "Dr. Hortência Olga Salas",
            "email": "marina13@example.net",
            "phone": "(65) 4232-0720",
            "document": "995.126.583-99",
            "type": "pf",
            "responsible": "Srta. Rebeca Franco Neto",
            "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 Z1eav63c6gkPbfDE5ad84Vh

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

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

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


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

Example response (200):


{
    "data": {
        "id": "6456f168-8bae-363b-a441-7afca43806dd",
        "name": "Srta. Maria Thalita Santiago Jr.",
        "email": "vitoria14@example.com",
        "phone": "(92) 97452-1823",
        "document": "877.457.149-40",
        "type": "pj",
        "responsible": "Dr. Kléber Luis Teles Filho",
        "image": {
            "id": null,
            "url": null
        },
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents_count": 0
    }
}
 

Request      

GET api/customers/{id}

Headers

Authorization        

Example: Bearer v645a8Vchad3Ee6f1ZPbgDk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 6

customer   string     

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

Update customer

requires authentication customers update

Update a customer

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 10

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

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 hf4PceZ31gabvaDd8E566Vk" \
    --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\": \"1fc29948-e316-33b1-a81e-544f4c35a5d7\",
    \"contract_id\": \"a27e3a47-15d7-33df-8f9d-3587a278ae72\",
    \"status_id\": \"077e897f-87e0-315a-8a93-176825c01bff\",
    \"filled_by\": \"a1ef54cb-e43f-35da-865d-0ad2e4d3db78\",
    \"responsible_id\": \"b5018cbe-6137-34c6-b02c-763c76e0b244\",
    \"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 hf4PceZ31gabvaDd8E566Vk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "1fc29948-e316-33b1-a81e-544f4c35a5d7",
    "contract_id": "a27e3a47-15d7-33df-8f9d-3587a278ae72",
    "status_id": "077e897f-87e0-315a-8a93-176825c01bff",
    "filled_by": "a1ef54cb-e43f-35da-865d-0ad2e4d3db78",
    "responsible_id": "b5018cbe-6137-34c6-b02c-763c76e0b244",
    "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": "21334ec0-cc4c-3a42-9bc6-a6dbbfd6c1ad",
            "code": "RDO-001",
            "report_number": 1,
            "date": "2026-07-31",
            "status": {
                "id": "a2649dfb-18ea-4f82-9732-02b0cc69cd34",
                "slug": null,
                "name": null,
                "abbreviation": "eaque",
                "color": "#9ce68a",
                "text_color": "#d02af7"
            },
            "work": {
                "id": "a2649dfb-11ca-4de7-a530-730e2d4407e6",
                "name": "Sr. Fabiano Sales Valentin Neto",
                "started_at": "2012-10-02 20:01:26"
            },
            "filled_by": {
                "id": "a2649dfb-162e-4f2b-b747-72b8774ecdae",
                "name": "Shania Sauer"
            },
            "contract_number": "458/2026",
            "deadline_at": "2027-07-31",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b34480ba-79c8-3b52-a617-b9c95fe8ee6f",
            "code": "RDO-001",
            "report_number": 1,
            "date": "2026-07-31",
            "status": {
                "id": "a2649dfb-22ca-4034-bdc2-4bdddcf8a5b2",
                "slug": null,
                "name": null,
                "abbreviation": "non",
                "color": "#4f0d85",
                "text_color": "#589015"
            },
            "work": {
                "id": "a2649dfb-1c97-4eb0-af7c-be46c1553238",
                "name": "Carla Camila Gusmão Jr.",
                "started_at": "2008-07-31 17:38:59"
            },
            "filled_by": {
                "id": "a2649dfb-2110-415b-800a-ffdd077b7704",
                "name": "Reuben Bradtke V"
            },
            "contract_number": "479/2026",
            "deadline_at": "2027-07-31",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 hf4PceZ31gabvaDd8E566Vk

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: 1fc29948-e316-33b1-a81e-544f4c35a5d7

contract_id   string  optional    

Contrato. The uuid of an existing record in the contracts table. Example: a27e3a47-15d7-33df-8f9d-3587a278ae72

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 077e897f-87e0-315a-8a93-176825c01bff

filled_by   string  optional    

Preenchido por. The uuid of an existing record in the users table. Example: a1ef54cb-e43f-35da-865d-0ad2e4d3db78

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: b5018cbe-6137-34c6-b02c-763c76e0b244

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

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

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


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

Example response (200):


{
    "data": {
        "id": "968b35e2-4f92-37cb-9b52-59520e324885",
        "code": "RDO-001",
        "report_number": 1,
        "date": "2026-07-31",
        "status": {
            "id": "a2649dfb-3631-44c0-bf03-21a327031086",
            "slug": null,
            "name": null,
            "abbreviation": "adipisci",
            "color": "#083aff",
            "text_color": "#622d93"
        },
        "work": {
            "id": "a2649dfb-2efd-4db8-967b-a6ee2cc17e24",
            "name": "Srta. Pietra Urias",
            "started_at": "2013-08-30 02:46:38"
        },
        "filled_by": {
            "id": "a2649dfb-341b-4e8a-bdb3-32db87dcc8e2",
            "name": "Alvina Bartoletti"
        },
        "contract_number": "304/2026",
        "deadline_at": "2027-07-31",
        "technical_responsible": {
            "name": null,
            "certification": null,
            "crea": null
        },
        "activities": [],
        "occurrences": null,
        "next_day_forecast": null,
        "finalized_at": null,
        "content_hash": null,
        "gov_br_validation_url": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/daily-logs/{dailyLog}

Headers

Authorization        

Example: Bearer D68Vgbk6dE1ec5v3fPa4hZa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: debitis

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 h6afceDav83PVEgk61Zb45d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contract_id\": \"Example Contract id\",
    \"date\": \"2024-01-01\",
    \"status_id\": \"ad97aaa1-cd3f-33b5-b95e-81cc9534550f\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs"
);

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

let body = {
    "contract_id": "Example Contract id",
    "date": "2024-01-01",
    "status_id": "ad97aaa1-cd3f-33b5-b95e-81cc9534550f"
};

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 h6afceDav83PVEgk61Zb45d

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: ad97aaa1-cd3f-33b5-b95e-81cc9534550f

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/aut" \
    --header "Authorization: Bearer 5E6P3D6cVf4vhdZaeg1bak8" \
    --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\": \"b9833f68-74d8-4d2d-a08e-8f62dfe2cdbb\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/aut"
);

const headers = {
    "Authorization": "Bearer 5E6P3D6cVf4vhdZaeg1bak8",
    "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": "b9833f68-74d8-4d2d-a08e-8f62dfe2cdbb",
            "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 5E6P3D6cVf4vhdZaeg1bak8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: aut

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: b9833f68-74d8-4d2d-a08e-8f62dfe2cdbb

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: rem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: omnis

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     

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: et

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: occaecati

id   string     

The ID of the photo. Example: occaecati

photo   string     

Photo (File) UUID Example: temporibus

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: id

photo   string     

Photo (File) UUID Example: alias

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: molestias

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


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

Example response (200):


{
    "data": [
        {
            "id": "aa91e2a6-28da-3fad-aa9b-ee78815161cc",
            "name": "Ipsam",
            "code": "VTH",
            "description": "Natus facere numquam nam earum incidunt.",
            "active": true
        },
        {
            "id": "3868a44a-1144-36a0-86d9-fc4806e11361",
            "name": "Aut",
            "code": "CIL",
            "description": "Veniam porro corrupti fugiat libero adipisci exercitationem.",
            "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 aZ68hg43cVdkEDva5b16feP

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


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

Example response (200):


{
    "data": {
        "id": "b93fbf40-d496-3e67-a6b4-870fd429e2bd",
        "name": "Nesciunt",
        "code": "OWW",
        "description": "Iusto commodi exercitationem deleniti dolorem saepe itaque.",
        "active": true
    }
}
 

Request      

GET api/disciplines/{id}

Headers

Authorization        

Example: Bearer DfhcbZV3486ve156dakgEaP

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

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

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

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

Body Parameters

name   string     

nome. Example: Example Name

code   string  optional    

código. Example: Example Code

description   string  optional    

descrição. Example: Example Description

active   boolean  optional    

ativo. Example: true

Delete discipline

requires authentication discipline delete

Delete a discipline

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

discipline   string     

Discipline UUID Example: doloribus

Document Categories

Endpoints for document categories

List document categories

requires authentication document-category index

List all document categories

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/document-categories?q=Contracts&module=employee" \
    --header "Authorization: Bearer g4h1kEcd583fPZaDb6vVa6e" \
    --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 g4h1kEcd583fPZaDb6vVa6e",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": [
        {
            "id": "59a43116-820b-329c-9e29-cae863fc76e7",
            "name": "Sr. Kléber Mauro Salas",
            "description": "Magni quae ab doloribus sed ad. Eos nemo eum illum. Ipsa ex eum doloribus facere eum est facere aut.",
            "module": "document"
        },
        {
            "id": "49422e1e-afa5-3eea-a5c0-6539fd74d3d2",
            "name": "Sra. Eunice Fernanda Dominato",
            "description": "Esse error impedit aut magni molestiae ad sed. Voluptatem et minima iusto dolorem repudiandae et expedita vel. Aut id quod vitae illum.",
            "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 g4h1kEcd583fPZaDb6vVa6e

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

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


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

Example response (200):


{
    "data": {
        "id": "8c9014a1-fb89-3182-be5c-d42073827668",
        "name": "Agustina Emily Pacheco",
        "description": "Ducimus qui et corporis eligendi. Consectetur atque sit tempora corrupti ipsum neque blanditiis. Voluptas qui et neque tenetur et quia. Quia aut culpa illum esse modi perspiciatis.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer Zh6k5P3af4ea8bV1cdDvg6E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: et

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: qui

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: aut

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[]=repellendus&documentable_type=hic&customers[]=ut&suppliers[]=aliquid" \
    --header "Authorization: Bearer PkZEb584a3gV61hDdcva6fe" \
    --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]": "repellendus",
    "documentable_type": "hic",
    "customers[0]": "ut",
    "suppliers[0]": "aliquid",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "104ca228-a038-380d-b15c-2e6c796995c7",
            "name": "Srta. Michelle Milene Pacheco Filho",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "39321b1b-db30-33ea-835e-c6d4db4b53aa",
            "name": "Mônica Mayara Fonseca Sobrinho",
            "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 PkZEb584a3gV61hDdcva6fe

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

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

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


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

Example response (200):


{
    "data": {
        "id": "53aeaa35-27d8-3b45-b01e-e8823f7182bd",
        "name": "Dr. Everton Thales Maldonado",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer vdP536beVkfhEDgc614aZ8a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 1

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 ha3vZ4e51V6E8DbfkgP6cad" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"fd001a3d-9349-3b98-883a-92a55477a49e\",
    \"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 ha3vZ4e51V6E8DbfkgP6cad",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "fd001a3d-9349-3b98-883a-92a55477a49e",
    "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 ha3vZ4e51V6E8DbfkgP6cad

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: fd001a3d-9349-3b98-883a-92a55477a49e

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/14" \
    --header "Authorization: Bearer aac1E6V6ZDdh5vkfeg3b8P4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"a213129a-de64-3f0e-853c-74fbe22b8dfa\",
    \"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/14"
);

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

let body = {
    "name": "Example Name",
    "category_id": "a213129a-de64-3f0e-853c-74fbe22b8dfa",
    "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 aac1E6V6ZDdh5vkfeg3b8P4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 14

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: a213129a-de64-3f0e-853c-74fbe22b8dfa

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

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

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

let body = {
    "q": "aut",
    "renewal_status": "pending",
    "urgency": "expired",
    "employee_id": "itaque",
    "epi_type_id": "totam"
};

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 h5g861aV4vkePcEab3fdZ6D

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: aut

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

epi_type_id   string  optional    

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

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

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

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

let body = {
    "quantity": 1,
    "condition": "new",
    "lot": "LOTE-001"
};

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

Request      

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

Headers

Authorization        

Example: Bearer ka3bD1Pf5g846ec6VvZaEdh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: voluptatem

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
lot   string  optional    

Lote do EPI. O campo value não pode ser superior a 255 caracteres. Example: LOTE-001

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: eaque

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

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

let body = {
    "q": "est"
};

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

Example response (200):


{
    "data": [
        {
            "id": "0bb545ee-fc53-37a0-8da0-58e69a5bd3df",
            "name": "impedit non",
            "default_validity_days": 168,
            "requires_signature": true,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "62a5a75b-e965-3fb9-86cc-e310295e604c",
            "name": "autem voluptas",
            "default_validity_days": 389,
            "requires_signature": true,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 Zkd5E6gPe6VDahb1v4ca8f3

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: est

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

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


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

Example response (200):


{
    "data": {
        "id": "a7c0d676-8023-3b27-ad18-b037054072a0",
        "name": "dicta voluptas",
        "default_validity_days": 459,
        "requires_signature": true,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer av8bcEVk66gP5Dhd3fa1Z4e

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: ullam

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

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

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

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

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/epi-types

Headers

Authorization        

Example: Bearer E4d16c3abVP65Dh8kgfaveZ

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

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

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

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

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

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer EgaV4D6h51ePdZ8ckvabf63

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: cupiditate

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: nobis

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


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

Example response (200):


{
    "data": [
        {
            "id": "7c40ae8b-8ed3-4073-8882-9e662a4fa034",
            "name": "saepe",
            "description": "Aut qui iusto natus velit odio quis.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c9c36a90-b912-4840-8f11-4189d9f4a7df",
            "name": "laudantium",
            "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 hg5kV6ev3adDE4f6caZ8P1b

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


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

Example response (200):


{
    "data": {
        "id": "b0549fbe-42f2-4e8c-a83a-4d326dbff941",
        "name": "mollitia",
        "description": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer e8va65acg41b6hZ3PVEfdDk

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: molestiae

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: esse

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

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

let body = {
    "sort_by": "delivery_date",
    "sort_desc": false,
    "page": 12,
    "per_page": 25,
    "q": "qui",
    "employee_id": "saepe",
    "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/epi-terms

Headers

Authorization        

Example: Bearer a8he6d3EaPV4c51Zfbkgv6D

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: delivery_date

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

Example: false

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Example: qui

employee_id   string  optional    

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

has_term   boolean  optional    

Example: true

List employees

requires authentication employee index

List all employees

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employees?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva" \
    --header "Authorization: Bearer PVE3gd8v6bc6h1aefk4DaZ5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "João Silva",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "8bc14b8f-5556-43c0-bf6e-14923f4771b8",
            "name": "Sr. Jean Vale",
            "cpf": "913.934.949-70",
            "rg": null,
            "ctps": "916077327",
            "phone": "(24) 3375-8244",
            "birthdate": "2018-04-28T03:00:00.000000Z",
            "email": "paes.marcelo@example.com",
            "pis_pasep": null,
            "admission_date": null,
            "daily_salary": null,
            "monthly_salary": "1444.11",
            "nationality": null,
            "place_of_birth": "Priscila d'Oeste",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a2649dfb-c11f-40f7-925d-a28807223a5c",
                "name": "blanditiis"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0afcbef3-eccb-4a66-88ef-145f1abcb0e7",
            "name": "Maraisa Vasques",
            "cpf": "256.524.094-41",
            "rg": "905460124",
            "ctps": null,
            "phone": "(61) 2383-8839",
            "birthdate": "1980-06-23T03:00:00.000000Z",
            "email": "lutero.emerson@example.org",
            "pis_pasep": null,
            "admission_date": "2009-01-01T02:00:00.000000Z",
            "daily_salary": null,
            "monthly_salary": null,
            "nationality": "Suiça",
            "place_of_birth": null,
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a2649dfb-c394-475e-97a7-5c7fe30c1bca",
                "name": "esse"
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": "/?page=11",
        "next": null
    },
    "meta": {
        "current_page": 12,
        "from": 111,
        "last_page": 1,
        "links": [
            {
                "url": "/?page=11",
                "label": "&laquo; Anterior",
                "page": 11,
                "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": 112,
        "total": 2
    }
}
 

Request      

GET api/employees

Headers

Authorization        

Example: Bearer PVE3gd8v6bc6h1aefk4DaZ5

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

Show employee

requires authentication employee show

Show an employee

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

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


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

Example response (200):


{
    "data": {
        "id": "36370566-015c-40c6-a288-b51296b5c68c",
        "name": "Aline Sophie Lutero Filho",
        "cpf": "181.385.041-25",
        "rg": "555561330",
        "ctps": "786371230",
        "phone": null,
        "birthdate": null,
        "email": null,
        "pis_pasep": null,
        "admission_date": null,
        "daily_salary": "195.09",
        "monthly_salary": null,
        "nationality": null,
        "place_of_birth": null,
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a2649dfb-ca55-4392-b9e8-c6f3c9bccecb",
            "name": "quo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer v4e1d63c5kb8h6fEaZVgDPa

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

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 68E6d43veDacf15gkbhZPaV" \
    --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\": \"7849614b-300c-4746-8223-3b15be78f9e7\",
    \"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 68E6d43veDacf15gkbhZPaV",
    "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": "7849614b-300c-4746-8223-3b15be78f9e7",
    "pis_pasep": "Example Pis pasep",
    "admission_date": "2024-01-01",
    "daily_salary": 1,
    "monthly_salary": 1,
    "nationality": "Example Nationality",
    "place_of_birth": "Example Place of birth",
    "address": {
        "0": "example1",
        "1": "example2",
        "street": "Example Address street",
        "number": "Example Address number",
        "complement": "Example Address complement",
        "neighborhood": "Example Address neighborhood",
        "city": "Example Address city",
        "state": "Example Address state",
        "zip_code": "Example Address zip code"
    }
};

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

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/employees

Headers

Authorization        

Example: Bearer 68E6d43veDacf15gkbhZPaV

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: 7849614b-300c-4746-8223-3b15be78f9e7

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. 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/12" \
    --header "Authorization: Bearer 8bkv63EVcDPZgea6hf5a1d4" \
    --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\": \"9314de7d-8223-4d0a-8ed6-5976afddd941\",
    \"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/12"
);

const headers = {
    "Authorization": "Bearer 8bkv63EVcDPZgea6hf5a1d4",
    "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": "9314de7d-8223-4d0a-8ed6-5976afddd941",
    "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 8bkv63EVcDPZgea6hf5a1d4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 12

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: 9314de7d-8223-4d0a-8ed6-5976afddd941

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 17

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/1/bank-account" \
    --header "Authorization: Bearer P13a4DZkVE8vfh5d6caeg6b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"non\",
    \"agency\": \"ahjwg\",
    \"account\": \"zsfyztxlityzdv\",
    \"account_type\": \"poupança\",
    \"pix_key\": \"xktegh\",
    \"favorite\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1/bank-account"
);

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

let body = {
    "bank_id": "non",
    "agency": "ahjwg",
    "account": "zsfyztxlityzdv",
    "account_type": "poupança",
    "pix_key": "xktegh",
    "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 P13a4DZkVE8vfh5d6caeg6b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

employee   string     

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

Body Parameters

bank_id   string     

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

agency   string     

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

account   string     

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

account_type   string     

Example: poupança

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

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

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

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

let body = {
    "bank_id": "nisi",
    "agency": "yqrcl",
    "account": "aqbvuoosxukwueylaqgr",
    "account_type": "poupança",
    "pix_key": "kemtk",
    "favorite": true
};

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

Request      

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

Headers

Authorization        

Example: Bearer aZ13VdPvb4hcg6Df6e5aEk8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 13

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

agency   string  optional    

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

account   string  optional    

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

account_type   string  optional    

Example: poupança

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

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

favorite   boolean  optional    

Example: true

Delete employee bank account

requires authentication employee-bank-account delete

Delete a bank account from an employee

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/employees/019556e7-2e9f-777c-a177-30bbf0646c32/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
    --header "Authorization: Bearer 5d3bk6ge18vf6cEaah4PVZD" \
    --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 5d3bk6ge18vf6cEaah4PVZD",
    "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 5d3bk6ge18vf6cEaah4PVZD

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

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

let body = {
    "q": "modi",
    "status": "expired",
    "epi_type_id": "vero"
};

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 1E6bc4afh6dPaZVv8geD3k5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

employee   string     

Employee UUID Example: velit

Body Parameters

q   string  optional    

Example: modi

status   string  optional    

Example: expired

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: et

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 18

id   string     

EPI delivery UUID Example: illum

employee   string     

Employee UUID Example: saepe

Create employee EPI delivery

requires authentication employee-epi store

Register an EPI delivery for an employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries" \
    --header "Authorization: Bearer P8hVfadbgck6v3Ze6D45a1E" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"9b7e6b4a-dbe6-3d09-8316-cf64cb121b3a\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"lot\": \"Example Lot\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries"
);

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

let body = {
    "epi_type_id": "9b7e6b4a-dbe6-3d09-8316-cf64cb121b3a",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "lot": "Example Lot"
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer P8hVfadbgck6v3Ze6D45a1E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

employee   string     

Employee UUID Example: laboriosam

Body Parameters

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 9b7e6b4a-dbe6-3d09-8316-cf64cb121b3a

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
lot   string  optional    

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

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/tempora/epi-deliveries/kit" \
    --header "Authorization: Bearer 6kaDPhvdEZ3ce8V6g5afb41" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_date\": \"2024-01-01\",
    \"items\": [
        {
            \"epi_type_id\": \"2b39f2cb-a4dd-3a6a-8bec-30ec011b88ce\",
            \"quantity\": 1,
            \"condition\": \"Example Items * condition\",
            \"lot\": \"Example Items * lot\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/tempora/epi-deliveries/kit"
);

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

let body = {
    "delivery_date": "2024-01-01",
    "items": [
        {
            "epi_type_id": "2b39f2cb-a4dd-3a6a-8bec-30ec011b88ce",
            "quantity": 1,
            "condition": "Example Items * condition",
            "lot": "Example Items * lot"
        },
        null
    ]
};

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

Example response (201):



 

Request      

POST api/employees/{employee}/epi-deliveries/kit

Headers

Authorization        

Example: Bearer 6kaDPhvdEZ3ce8V6g5afb41

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: tempora

Body Parameters

delivery_date   string     

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

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: 2b39f2cb-a4dd-3a6a-8bec-30ec011b88ce

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
lot   string  optional    

Lote. O campo value não pode ser superior a 255 caracteres. Example: Example Items * lot

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/1/epi-deliveries/nemo" \
    --header "Authorization: Bearer DEfe6aa84b5k3gdv6hV1PcZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"bc3dc37c-e3ff-38a6-b9d8-c5503a6cd1c0\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"lot\": \"Example Lot\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1/epi-deliveries/nemo"
);

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

let body = {
    "epi_type_id": "bc3dc37c-e3ff-38a6-b9d8-c5503a6cd1c0",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "lot": "Example Lot"
};

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

Request      

PUT api/employees/{employee_id}/epi-deliveries/{id}

Headers

Authorization        

Example: Bearer DEfe6aa84b5k3gdv6hV1PcZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

id   string     

EPI delivery UUID Example: nemo

employee   string     

Employee UUID Example: quidem

Body Parameters

epi_type_id   string  optional    

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: bc3dc37c-e3ff-38a6-b9d8-c5503a6cd1c0

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
lot   string  optional    

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: architecto

id   string     

EPI delivery UUID Example: debitis

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/5/epi-terms" \
    --header "Authorization: Bearer 3fbV4k5g1v6DhE8cZ6eaaPd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"delivery_date\",
    \"sort_desc\": false,
    \"page\": 34,
    \"per_page\": 7,
    \"q\": \"earum\",
    \"employee_id\": \"molestiae\",
    \"has_term\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/5/epi-terms"
);

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

let body = {
    "sort_by": "delivery_date",
    "sort_desc": false,
    "page": 34,
    "per_page": 7,
    "q": "earum",
    "employee_id": "molestiae",
    "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/employees/{employee_id}/epi-terms

Headers

Authorization        

Example: Bearer 3fbV4k5g1v6DhE8cZ6eaaPd

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

Body Parameters

sort_by   string  optional    

Example: delivery_date

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

Example: false

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Example: earum

employee_id   string  optional    

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

has_term   boolean  optional    

Example: false

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/accusantium/epi-terms/cf3a8168-5c4d-3b7e-b306-bf1c059f1491/upload" \
    --header "Authorization: Bearer VE6c416hb3Pg8adfZkeavD5" \
    --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/accusantium/epi-terms/cf3a8168-5c4d-3b7e-b306-bf1c059f1491/upload"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: accusantium

kitUuid   string     

Kit UUID Example: cf3a8168-5c4d-3b7e-b306-bf1c059f1491

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/velit/epi-terms/d2831402-2c6f-32e0-a4f3-c3040e5bed0d/document" \
    --header "Authorization: Bearer 6cVae4Z1D38bfhkgdv6Ea5P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/velit/epi-terms/d2831402-2c6f-32e0-a4f3-c3040e5bed0d/document"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: velit

kitUuid   string     

Kit UUID Example: d2831402-2c6f-32e0-a4f3-c3040e5bed0d

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/42bd15e0-01f6-31cf-8db5-8d436edd55f4" \
    --header "Authorization: Bearer 8ZdEb4gDf61eavkV5chP36a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/42bd15e0-01f6-31cf-8db5-8d436edd55f4"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 42bd15e0-01f6-31cf-8db5-8d436edd55f4

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/189dd7b2-e6cc-341b-a71c-c77b61c6bb58/info" \
    --header "Authorization: Bearer f5deEahgc6aDZ4638vkP1Vb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/189dd7b2-e6cc-341b-a71c-c77b61c6bb58/info"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 189dd7b2-e6cc-341b-a71c-c77b61c6bb58

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/a2b844c8-5b96-3afa-943a-d1debfa64c45/download" \
    --header "Authorization: Bearer d1khEZg5abPvD86f463aVec" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/a2b844c8-5b96-3afa-943a-d1debfa64c45/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: a2b844c8-5b96-3afa-943a-d1debfa64c45

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

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

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 a8vE1h3faZVdD6kePc5b46g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"aut\",
    \"supplier_id\": \"eligendi\",
    \"work_id\": \"sed\",
    \"start_date\": \"2026-07-31T17:38:29\",
    \"end_date\": \"2094-06-25\",
    \"per_page\": 5
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "q": "aut",
    "supplier_id": "eligendi",
    "work_id": "sed",
    "start_date": "2026-07-31T17:38:29",
    "end_date": "2094-06-25",
    "per_page": 5
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "nfe_access_key": null,
            "nfe_number": null,
            "nfe_series": null,
            "issue_date": null,
            "total_value": null,
            "emit": {
                "cnpj": null,
                "name": null
            },
            "dest": {
                "document": null,
                "name": null
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        },
        {
            "id": null,
            "nfe_access_key": null,
            "nfe_number": null,
            "nfe_series": null,
            "issue_date": null,
            "total_value": null,
            "emit": {
                "cnpj": null,
                "name": null
            },
            "dest": {
                "document": null,
                "name": null
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 a8vE1h3faZVdD6kePc5b46g

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: aut

supplier_id   string  optional    

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

work_id   string  optional    

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

start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-31T17:38:29

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-25

per_page   integer  optional    

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

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

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

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

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

Example response (201):


{
    "data": {
        "id": null,
        "nfe_access_key": null,
        "nfe_number": null,
        "nfe_series": null,
        "issue_date": null,
        "total_value": null,
        "emit": {
            "cnpj": null,
            "name": null
        },
        "dest": {
            "document": null,
            "name": null
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

POST api/fiscal-documents

Headers

Authorization        

Example: Bearer ea165gvkhf86dZbVaDEP3c4

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: unde

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "nfe_access_key": null,
        "nfe_number": null,
        "nfe_series": null,
        "issue_date": null,
        "total_value": null,
        "emit": {
            "cnpj": null,
            "name": null
        },
        "dest": {
            "document": null,
            "name": null
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

GET api/fiscal-documents/{fiscalDocument}

Headers

Authorization        

Example: Bearer 6bdEaagc1D6h54Zv3Pkf8eV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: ratione

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: earum

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

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

let body = {
    "file": {
        "path": "commodi",
        "name": "veritatis",
        "extension": "repellendus"
    }
};

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

Example response (200):


{
    "data": {
        "id": null,
        "nfe_access_key": null,
        "nfe_number": null,
        "nfe_series": null,
        "issue_date": null,
        "total_value": null,
        "emit": {
            "cnpj": null,
            "name": null
        },
        "dest": {
            "document": null,
            "name": null
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer cZD16h85bEV43vaPfgd6kae

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: voluptatibus

Body Parameters

file   object     
path   string     

Example: commodi

name   string     

Example: veritatis

extension   string     

Example: repellendus

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "nfe_access_key": null,
        "nfe_number": null,
        "nfe_series": null,
        "issue_date": null,
        "total_value": null,
        "emit": {
            "cnpj": null,
            "name": null
        },
        "dest": {
            "document": null,
            "name": null
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 6ZfPek8Vdb6ava4DhcE135g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: quia

file   string     

UUID do arquivo anexado Example: id

Sync works

requires authentication fiscal-documents update

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

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

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

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

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

Example response (200):


{
    "data": {
        "id": null,
        "nfe_access_key": null,
        "nfe_number": null,
        "nfe_series": null,
        "issue_date": null,
        "total_value": null,
        "emit": {
            "cnpj": null,
            "name": null
        },
        "dest": {
            "document": null,
            "name": null
        },
        "financial_status": "pending",
        "products_imported_at": null,
        "created_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer eDkfgPv1hb4Z58dcV66E3aa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: est

Body Parameters

work_ids   string[]  optional    

The uuid of an existing record in the works table.

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 65a13PhbZDagd4v8Vk6cfeE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"s3_file_path\": \"imports\\/nfe_12345.xml\",
    \"original_filename\": \"nota_fiscal_001.xml\",
    \"import_type\": \"nfe\",
    \"fiscal_document_id\": \"019556e7-2e9f-777c-a177-30bbf0646c32\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);

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

let body = {
    "s3_file_path": "imports\/nfe_12345.xml",
    "original_filename": "nota_fiscal_001.xml",
    "import_type": "nfe",
    "fiscal_document_id": "019556e7-2e9f-777c-a177-30bbf0646c32"
};

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

Example response (201, Import created successfully):


{
    "import_id": "9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a",
    "status": "pending",
    "channel": "import-progress.9d2f8e4a-1b3c-4d5e-6f7a-8b9c0d1e2f3a"
}
 

Example response (404, File not found in S3):


{
    "error": "Arquivo não encontrado no S3"
}
 

Example response (422, Invalid XML or not a valid NFe):


{
    "error": "Arquivo XML inválido ou não é uma NFe"
}
 

Request      

POST api/imports/nfe/products

Headers

Authorization        

Example: Bearer 65a13PhbZDagd4v8Vk6cfeE

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: 019556e7-2e9f-777c-a177-30bbf0646c32

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

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

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


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

Example response (200, Import details retrieved successfully):


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

Request      

GET api/imports/{importId}

Headers

Authorization        

Example: Bearer 86Eg1edDcfaZ3vakb6hP54V

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: laboriosam

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: non

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: est

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: accusamus

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

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

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

let body = {
    "sort_by": "illo",
    "sort_desc": false,
    "page": 34,
    "per_page": 3
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "et enim",
            "abbreviation": "HL"
        },
        {
            "id": null,
            "name": "tempore autem",
            "abbreviation": "FJ"
        }
    ],
    "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 kg18Ve665bP3cahZ4faDEdv

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: illo

sort_desc   boolean  optional    

Example: false

page   integer  optional    

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

per_page   integer  optional    

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "Deeburgh"
        },
        {
            "id": null,
            "name": "Port Martineview"
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer 1DZ5bdhafe6vE43cVa6gkP8

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

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

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

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

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "ab64e969-ac48-3666-82a4-80fd0af14557",
            "receipt_number": "REC-8846",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Rey Daniel",
                "document": "383.179.573-21"
            },
            "payment": {
                "amount": 1195.73,
                "amount_in_words": "Valor por extenso de teste",
                "method": "bank_transfer",
                "description": "Inventore eum qui perspiciatis optio quae est."
            },
            "issuer": {
                "name": "Sporer-Kuhic",
                "document": "59.312.987/7171-61"
            },
            "issue": {
                "date": "2026-07-05",
                "city": "Adellburgh",
                "state": "MG"
            },
            "created_by": {
                "id": "a2649dfc-b035-4934-addc-623fef68726f",
                "name": "Lucio Kunde"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0ffe17dd-f6db-3054-becb-8c4d57f90712",
            "receipt_number": "REC-6124",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Nigel Sanford DDS",
                "document": "461.638.677-06"
            },
            "payment": {
                "amount": 1656.87,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Recusandae qui voluptatem saepe omnis architecto."
            },
            "issuer": {
                "name": "Spencer, Mayert and Breitenberg",
                "document": "34.732.827/0889-12"
            },
            "issue": {
                "date": "2026-07-03",
                "city": "North Colbyside",
                "state": "GO"
            },
            "created_by": {
                "id": "a2649dfc-b34c-4c69-b4ff-c5dae5765312",
                "name": "Miss Sonya Mosciski III"
            },
            "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 vfbak36Zc4dag856VDh1eEP

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query (searches in receiver name, document, and receipt number). Example: João Silva

employee_id   string  optional    

Filter by employee UUID. The uuid of an existing record in the employees table. Example: a01edd80-bf3e-40f7-8613-ccb4be5831b3

receiver_type   string  optional    

Filter by receiver type. Example: employee

Must be one of:
  • employee
  • custom
start_date   string  optional    

Filter by issue date (start). O campo value deve ser uma data válida. Example: 2025-01-01

end_date   string  optional    

Filter by issue date (end). O campo value deve ser uma data válida. O campo value deve ser uma data posterior ou igual a start_date. Example: 2025-12-31

min_amount   number  optional    

Filter by minimum amount. O campo value deve ser pelo menos 0. Example: 100

max_amount   number  optional    

Filter by maximum amount. O campo value deve ser pelo menos 0. Example: 1000

payment_method   string  optional    

Filter by payment method. Example: PIX

city   string  optional    

Filter by city. Example: São Paulo

search   string  optional    

Example: aut

document   string  optional    

Example: possimus

work_id   string  optional    

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

bank_account_id   string  optional    

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

Show receipt cash flow config

requires authentication payment-receipt cash-flow-config index

Lista cada forma de pagamento e se ela gera lancamento automatico no fluxo de caixa

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/cash-flow-config" \
    --header "Authorization: Bearer 1P6eV5gc8Df4aE6vdZh3akb" \
    --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 1P6eV5gc8Df4aE6vdZh3akb",
    "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 1P6eV5gc8Df4aE6vdZh3akb

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

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


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

Example response (200):


{
    "data": {
        "id": "a582a822-c1eb-3651-9675-61666d7762ef",
        "receipt_number": "REC-5832",
        "receiver_type": "employee",
        "receiver": {
            "id": null,
            "name": "Dora Metz",
            "document": "654.171.092-33"
        },
        "payment": {
            "amount": 6812.7,
            "amount_in_words": "Valor por extenso de teste",
            "method": "bank_transfer",
            "description": "Qui ipsam accusamus est qui unde."
        },
        "issuer": {
            "name": "Cassin, Weissnat and Dare",
            "document": "32.394.122/2818-87"
        },
        "issue": {
            "date": "2026-07-09",
            "city": "New Caleighmouth",
            "state": "SP"
        },
        "created_by": {
            "id": "a2649dfc-c075-492d-822f-d9a2cfb5119e",
            "name": "Miss Lillie Huel V"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer a18Pkv4d3VeZ66gEhabDcf5

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 Z3ck8a41hdPbeE5V6aDf6gv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"8dfb4968-7c54-4bb3-ab85-963477f629b3\",
    \"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\": \"6aed1b6b-9e1d-34de-822f-5236e93f168f\",
    \"bank_account_id\": \"f5ad59bf-73a5-3c08-89af-b29002c1ab51\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "8dfb4968-7c54-4bb3-ab85-963477f629b3",
    "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": "6aed1b6b-9e1d-34de-822f-5236e93f168f",
    "bank_account_id": "f5ad59bf-73a5-3c08-89af-b29002c1ab51"
};

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 Z3ck8a41hdPbeE5V6aDf6gv

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

receiver_type   string     

Tipo de Recebedor. Example: Example Receiver type

Must be one of:
  • employee
  • custom
employee_id   string  optional    

Funcionário. This field is required when receiver_type is employee. The uuid of an existing record in the employees table. Example: 8dfb4968-7c54-4bb3-ab85-963477f629b3

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: 6aed1b6b-9e1d-34de-822f-5236e93f168f

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: f5ad59bf-73a5-3c08-89af-b29002c1ab51

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 D6ghVe64abaEvf5P3k81dZc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"d08ba66d-08c7-4c93-b605-22209f4e255b\",
    \"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\": \"90ba4fa1-e844-3cdc-a474-5f00df995f6f\",
    \"bank_account_id\": \"b2e0acf3-d43e-3d54-b8d7-7fe5d3cb362a\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "d08ba66d-08c7-4c93-b605-22209f4e255b",
    "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": "90ba4fa1-e844-3cdc-a474-5f00df995f6f",
    "bank_account_id": "b2e0acf3-d43e-3d54-b8d7-7fe5d3cb362a"
};

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 D6ghVe64abaEvf5P3k81dZc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

receipt   string     

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

Body Parameters

receiver_type   string  optional    

Tipo de Recebedor. Example: Example Receiver type

Must be one of:
  • employee
  • custom
employee_id   string  optional    

Funcionário. This field is required when receiver_type is employee. The uuid of an existing record in the employees table. Example: d08ba66d-08c7-4c93-b605-22209f4e255b

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: 90ba4fa1-e844-3cdc-a474-5f00df995f6f

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: b2e0acf3-d43e-3d54-b8d7-7fe5d3cb362a

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 461Dcaevdbga5h3VPZEfk68" \
    --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 461Dcaevdbga5h3VPZEfk68",
    "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 461Dcaevdbga5h3VPZEfk68

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

receipt   string     

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

List employee receipts

requires authentication payment-receipt index

List all payment receipts for a specific employee

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "b8d06c9e-8f42-3a52-9941-5b3d3384898b",
            "receipt_number": "REC-5555",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Vida Beer",
                "document": "907.235.512-45"
            },
            "payment": {
                "amount": 2560.6,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Et aut ipsa laboriosam perspiciatis voluptas perferendis."
            },
            "issuer": {
                "name": "Christiansen and Sons",
                "document": "95.533.615/8856-86"
            },
            "issue": {
                "date": "2026-07-15",
                "city": "Julestown",
                "state": "BA"
            },
            "created_by": {
                "id": "a2649dfc-f8fd-4669-bf6f-5e942b8cfcf3",
                "name": "Darian Nikolaus"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "025cbadf-c2b5-3ca2-8c82-472332792f86",
            "receipt_number": "REC-5252",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Ms. Amely Kessler",
                "document": "037.772.808-15"
            },
            "payment": {
                "amount": 7841.04,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Id iusto quia atque ut."
            },
            "issuer": {
                "name": "Feil Ltd",
                "document": "79.407.719/5239-66"
            },
            "issue": {
                "date": "2026-07-24",
                "city": "North Xanderland",
                "state": "PE"
            },
            "created_by": {
                "id": "a2649dfc-fb5c-4d94-af09-ecfcf631093f",
                "name": "Delphine Auer"
            },
            "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 avkb1d66hf3cVe5ZPDgE4a8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

employee   string     

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

Permission Groups

Endpoints for permission groups

List ungrouped permissions

requires authentication permission-group index

List all permissions that do not belong to any permission group.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/permission-groups/ungrouped-permissions?q=Permission+name&page=1&per_page=10" \
    --header "Authorization: Bearer 5DgE8Zcfadvk41h6P3Vba6e" \
    --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 5DgE8Zcfadvk41h6P3Vba6e",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": [
        {
            "id": "7da9d034-0e20-3dfd-a69a-a4ce6671f786",
            "name": "consequatur",
            "display_name": "Ullam sit voluptatem est nulla."
        },
        {
            "id": "d5e1fe5d-d6e7-3047-873c-78e9ffb85a6f",
            "name": "aperiam",
            "display_name": "Voluptas facere error at aut."
        }
    ],
    "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 5DgE8Zcfadvk41h6P3Vba6e

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


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

Example response (200):


{
    "data": [
        {
            "id": "0a781dfe-ac30-357e-8f69-266b90973660",
            "name": "aut-officiis-iste",
            "display_name": "molestiae voluptatem est",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6e4ed32a-d879-3f4d-8b30-4cabca3778d5",
            "name": "non-dicta-et",
            "display_name": "amet quo illum",
            "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 Pe53kb866ZEchVaD1v4gfda

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

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

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


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

Example response (200):


{
    "data": {
        "id": "14e0b0f0-ef2f-365e-be27-84660c7d5039",
        "name": "nobis-vel",
        "display_name": "facere dolorum ipsa",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer 538EekVa6ah4Pb6gDdfZv1c

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

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 v8akD6PVb5Eg1634daZhfec" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"bb9c67d5-756f-3a4e-8bd7-f15459f08e91\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "bb9c67d5-756f-3a4e-8bd7-f15459f08e91"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "bf3a4ff9-0711-324f-9408-e9339a197595",
        "name": "nulla-occaecati",
        "display_name": "et perferendis ut",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer v8akD6PVb5Eg1634daZhfec

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 baaDk6c54dh3eEvPgV6Z81f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"c8d0ccb6-404e-3291-bf79-40af264395b6\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "c8d0ccb6-404e-3291-bf79-40af264395b6"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "6715082f-4898-3ccd-97aa-8a1783131718",
        "name": "illo-ratione",
        "display_name": "fugit enim nobis",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer baaDk6c54dh3eEvPgV6Z81f

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


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

Example response (200):


{
    "data": [
        {
            "id": "ba2fa03a-ee8f-3add-b79e-5a71173faec5",
            "name": "Thomas Pontes Marques Sobrinho",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "56f1279b-0967-33ee-9d24-64c9d20b13a0",
            "name": "Vicente Cordeiro Gomes 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 adkDPa14EZ8c65e6Vbfgvh3

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

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


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

Example response (200):


{
    "data": {
        "id": "d317eea9-23a3-3aaa-8df3-b1885a425bc2",
        "name": "Dr. Paula das Dores",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer 5ZhP8aDegEdc466kfa31Vvb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: et

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: voluptatem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: rerum

Product Families

Endpoints for product families

List product families

requires authentication product-family index

List all product families

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/product-families?q=Structure" \
    --header "Authorization: Bearer ehEcvfb1DZg486aPkV3d56a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families"
);

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "7c70d06e-6bd4-36fb-aaaf-fa8e226e07e2",
            "name": "Samuel de Aguiar Caldeira",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "8697a4f0-5582-3355-ba6b-b922df2e30c2",
            "name": "Dr. Luiz Artur Pontes Neto",
            "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 ehEcvfb1DZg486aPkV3d56a

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

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

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


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

Example response (200):


{
    "data": {
        "id": "df9f5e5e-7e10-3411-b966-b2b54c76b3d9",
        "name": "Srta. Elizabeth Benites Abreu Neto",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer gPv5hZkc6V48a1adfE6be3D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: non

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 d4ePgEDfV8kZa6163c5avbh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families"
);

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

Headers

Authorization        

Example: Bearer d4ePgEDfV8kZa6163c5avbh

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

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/cupiditate" \
    --header "Authorization: Bearer kfZev451c3gEPbh86aaVd6D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families/cupiditate"
);

const headers = {
    "Authorization": "Bearer kfZev451c3gEPbh86aaVd6D",
    "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-families/{productFamily}

Headers

Authorization        

Example: Bearer kfZev451c3gEPbh86aaVd6D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: cupiditate

Body Parameters

name   string     

Nome. Example: Example Name

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: quis

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 6df3VbvaEDaekg14c8P56hZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"06a7b789-3653-3421-82ec-f168da2346c2\",
    \"user_id\": \"9ac07dfa-bc51-3d39-8c37-438aee926476\",
    \"responsible_id\": \"e82f5527-3f44-3512-b653-067d142e9d5d\",
    \"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 6df3VbvaEDaekg14c8P56hZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "06a7b789-3653-3421-82ec-f168da2346c2",
    "user_id": "9ac07dfa-bc51-3d39-8c37-438aee926476",
    "responsible_id": "e82f5527-3f44-3512-b653-067d142e9d5d",
    "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": "da0cd7e5-d96b-32e1-aa46-4e3239b1df74",
            "name": "Velit non sed unde nemo.",
            "description": null,
            "work": {
                "id": "a2649dfd-8cbd-4889-9310-cbe265d22d0c",
                "name": "Stephany Aragão"
            },
            "user": {
                "id": "a2649dfd-8fd5-4e68-84d0-59739d0083dc",
                "name": "Dr. Willard Towne PhD"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ec0affa9-6b3b-373b-95c6-c0a336f97595",
            "name": "Ea itaque nulla reprehenderit.",
            "description": null,
            "work": {
                "id": "a2649dfd-9368-4e96-bb27-06a039256599",
                "name": "Mel Arruda Jr."
            },
            "user": {
                "id": "a2649dfd-9640-4619-96ad-89babceb3b5e",
                "name": "Edison Jast"
            },
            "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 6df3VbvaEDaekg14c8P56hZ

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: 06a7b789-3653-3421-82ec-f168da2346c2

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 9ac07dfa-bc51-3d39-8c37-438aee926476

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: e82f5527-3f44-3512-b653-067d142e9d5d

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

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


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

Example response (200):


{
    "data": {
        "id": "f5ba15ca-4576-39ed-a562-40281294afe4",
        "name": "Harum tenetur dolores.",
        "description": "Cumque in sapiente temporibus aut atque impedit. Quia consequatur ut debitis nulla officiis. Aspernatur est perferendis optio. Eligendi velit omnis officiis eum.",
        "work": {
            "id": "a2649dfd-9dc3-4c85-8918-a7eba10ba738",
            "name": "Dr. Carla Isabella Fernandes"
        },
        "user": {
            "id": "a2649dfd-a0ba-473f-9011-e8c1053e3906",
            "name": "Vesta Lakin"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer d6E1kPvefaV4gD835Zc6hab

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ipsam

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/in/items" \
    --header "Authorization: Bearer 613dPEafk8b46hVZav5gDec" \
    --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/in/items"
);

const headers = {
    "Authorization": "Bearer 613dPEafk8b46hVZav5gDec",
    "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": "34286a69-083b-36df-b252-219dfea24f3f",
            "product": {
                "id": "a2649dfd-b423-479d-bcc7-06c73226098c",
                "name": "Srta. Constância Neves Balestero",
                "code": "PRD-399501",
                "unit": {
                    "id": "a2649dfd-b226-4a21-abc0-507c2b21455a",
                    "name": "Dr. Renan Teles",
                    "abbreviation": "Thiago Galindo"
                }
            },
            "quantity": 131.9737,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "01fe7c46-5f3b-39e7-8579-db0cb9c916aa",
            "product": {
                "id": "a2649dfd-c399-42a6-9ddd-81f85b052d88",
                "name": "Isabel Thaís Maldonado Neto",
                "code": "PRD-231521",
                "unit": {
                    "id": "a2649dfd-c261-48a5-9ebd-0e03fa3422be",
                    "name": "Sr. Deivid Gusmão Sobrinho",
                    "abbreviation": "Flávio Maia"
                }
            },
            "quantity": 157.9435,
            "observation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 613dPEafk8b46hVZav5gDec

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: in

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 6aZ4vf183gPakEhcDbdV56e" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"7dc34309-fbc0-34a7-94ac-53b1e1755462\",
    \"items\": [
        {
            \"product_id\": \"e8e5c5a7-16c1-31c9-b90e-afaece631184\",
            \"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 6aZ4vf183gPakEhcDbdV56e",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "7dc34309-fbc0-34a7-94ac-53b1e1755462",
    "items": [
        {
            "product_id": "e8e5c5a7-16c1-31c9-b90e-afaece631184",
            "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 6aZ4vf183gPakEhcDbdV56e

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: 7dc34309-fbc0-34a7-94ac-53b1e1755462

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: e8e5c5a7-16c1-31c9-b90e-afaece631184

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/ipsa" \
    --header "Authorization: Bearer cDdbf38a4kEP5ehv6Vg61aZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"c9a950b1-adf2-3f69-aed1-81d8d4db543e\",
            \"product_id\": \"b1e6190d-d819-3a53-80e1-4b1e7b4a8128\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/ipsa"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "c9a950b1-adf2-3f69-aed1-81d8d4db543e",
            "product_id": "b1e6190d-d819-3a53-80e1-4b1e7b4a8128",
            "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 cDdbf38a4kEP5ehv6Vg61aZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ipsa

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: c9a950b1-adf2-3f69-aed1-81d8d4db543e

product_id   string     

Produto. The uuid of an existing record in the products table. Example: b1e6190d-d819-3a53-80e1-4b1e7b4a8128

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: fugit

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/facere/items" \
    --header "Authorization: Bearer Pva3DfE6V5bdgek1h84aZc6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"2efe3e40-f571-3207-a5d7-a04be22c910f\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/facere/items"
);

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

let body = {
    "items": [
        {
            "product_id": "2efe3e40-f571-3207-a5d7-a04be22c910f",
            "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 Pva3DfE6V5bdgek1h84aZc6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: facere

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: 2efe3e40-f571-3207-a5d7-a04be22c910f

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: ducimus

item   string     

Product Quantity List Item UUID Example: error

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/consequuntur/items" \
    --header "Authorization: Bearer bPfVg6ak4vD6caE18e35Zdh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"09dfc0c1-600d-342e-b5aa-29fa837a0bce\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/consequuntur/items"
);

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

let body = {
    "items": [
        "09dfc0c1-600d-342e-b5aa-29fa837a0bce"
    ]
};

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 bPfVg6ak4vD6caE18e35Zdh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: consequuntur

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/vel/sync-items" \
    --header "Authorization: Bearer aeVh16fk6P4dgE8Dca5Zv3b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"22448d40-5f60-3a47-a1fb-bbace6f25447\",
            \"product_id\": \"c334aac1-1d2e-3369-a627-c902da32c346\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/vel/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "22448d40-5f60-3a47-a1fb-bbace6f25447",
            "product_id": "c334aac1-1d2e-3369-a627-c902da32c346",
            "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 aeVh16fk6P4dgE8Dca5Zv3b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: vel

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: 22448d40-5f60-3a47-a1fb-bbace6f25447

product_id   string     

Produto. The uuid of an existing record in the products table. Example: c334aac1-1d2e-3369-a627-c902da32c346

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/rem/fulfill" \
    --header "Authorization: Bearer E5cg4Z1a38h66PVfdkDbeva" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"f8ff0f54-3f4c-3621-8558-a2cbd51b3643\",
    \"quantity\": 1,
    \"source_stock_id\": \"70e12277-372e-31f9-87b7-1c4987dd26c8\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"751612e5-5790-35ed-bce0-2c4b19f9b901\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/rem/fulfill"
);

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

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "f8ff0f54-3f4c-3621-8558-a2cbd51b3643",
    "quantity": 1,
    "source_stock_id": "70e12277-372e-31f9-87b7-1c4987dd26c8",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "751612e5-5790-35ed-bce0-2c4b19f9b901",
            "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 E5cg4Z1a38h66PVfdkDbeva

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: rem

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: f8ff0f54-3f4c-3621-8558-a2cbd51b3643

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: 70e12277-372e-31f9-87b7-1c4987dd26c8

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: 751612e5-5790-35ed-bce0-2c4b19f9b901

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/rerum/fulfillments" \
    --header "Authorization: Bearer 3c41g865DfPhVaZedvakEb6" \
    --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/rerum/fulfillments"
);

const headers = {
    "Authorization": "Bearer 3c41g865DfPhVaZedvakEb6",
    "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": "6c41d362-283d-3566-8b8a-f494c33de4c5",
            "quantity": 9.5185,
            "fulfilled_at": "2026-07-13T20:18:33.000000Z",
            "created_at": null
        },
        {
            "id": "b17dc9ed-b26c-39ea-8dc3-9dc44b78fa3a",
            "quantity": 98.0832,
            "fulfilled_at": "2026-07-03T15:18:31.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 3c41g865DfPhVaZedvakEb6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: rerum

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

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


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

Example response (200):


{
    "data": {
        "id": "7be847af-5457-3714-b8bb-c69f2f676887",
        "product": {
            "id": "a2649e01-a536-4c30-a1af-bb5706267f8f",
            "name": "Sr. Maicon Campos Sobrinho",
            "code": "PRD-009187",
            "unit": {
                "id": "a2649e01-a444-473f-8873-bd27538c1355",
                "name": "Dr. Reinaldo Alcantara Filho",
                "abbreviation": "Joaquim Prado"
            }
        },
        "quantity": 733.2517,
        "quantity_fulfilled": 0,
        "quantity_pending": 733.2517,
        "is_fulfilled": false,
        "is_partially_fulfilled": false,
        "observation": "Omnis beatae sed a ipsam labore reprehenderit.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer c653dP1evhkbf6aZD4gaVE8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: consectetur

item   string     

Product Request Item UUID Example: sed

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

const headers = {
    "Authorization": "Bearer Zbae8665fvkg3h4a1cPEDdV",
    "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": "d06cf30e-9d6f-3958-83df-72a17c55ea74",
            "product": {
                "id": "a2649e01-ba8d-423e-bb2a-0168ff6428c1",
                "name": "Sra. Manuela Padilha Sobrinho",
                "code": "PRD-593243",
                "unit": {
                    "id": "a2649e01-b95f-49a4-8c58-eaad4fe66f71",
                    "name": "Ariana Beatriz Ramires Sobrinho",
                    "abbreviation": "Srta. Joyce Colaço Verdugo Jr."
                }
            },
            "quantity": 227.7152,
            "quantity_fulfilled": 0,
            "quantity_pending": 227.7152,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Excepturi sint eligendi ullam et cupiditate pariatur quia.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7cc99bfe-e467-3e88-8ba9-3d99ef9ef192",
            "product": {
                "id": "a2649e01-cb5a-4d45-8ff5-0bf822f6c6c3",
                "name": "Dr. Rodolfo Matos Marques Filho",
                "code": "PRD-418231",
                "unit": {
                    "id": "a2649e01-ca3e-4e91-8f91-cf8d0965c9d9",
                    "name": "Sr. Wagner Padilha Serna",
                    "abbreviation": "Hortência Barros Zambrano"
                }
            },
            "quantity": 341.596,
            "quantity_fulfilled": 0,
            "quantity_pending": 341.596,
            "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 Zbae8665fvkg3h4a1cPEDdV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: itaque

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "c23ffa3f-22ad-338e-9a37-88ca6d2693db",
            "product": {
                "id": "a2649e01-e0bf-482b-94fc-9c3a0f4bbfc8",
                "name": "Isis Fontes Sobrinho",
                "code": "PRD-070855",
                "unit": {
                    "id": "a2649e01-df74-4fcd-839e-a94b9c5586c9",
                    "name": "Maraisa Alves",
                    "abbreviation": "Dr. Letícia Cristina Santos"
                }
            },
            "quantity": 983.3415,
            "quantity_fulfilled": 0,
            "quantity_pending": 983.3415,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Dolorem nihil accusamus pariatur quasi amet deleniti iure.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "10875c0a-c33d-3383-af13-63d726234bfc",
            "product": {
                "id": "a2649e01-efb1-43b7-acd5-13bdc2e05d87",
                "name": "Sra. Ketlin Marés",
                "code": "PRD-707962",
                "unit": {
                    "id": "a2649e01-eeb1-4b0e-a43a-c707fe8e8130",
                    "name": "Analu Molina Sobrinho",
                    "abbreviation": "Sra. Gisela Marques Ramires"
                }
            },
            "quantity": 470.562,
            "quantity_fulfilled": 0,
            "quantity_pending": 470.562,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Magni et et laudantium numquam eos quibusdam corrupti.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer vfg58aZd6e6VPckah34ED1b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: eos

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 65hegZbd3P6fD4vk8Va1aEc" \
    --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\": \"179a3589-158c-37f8-9edd-704685ca5ad9\",
    \"work_location_id\": \"0feb45fe-0d45-393e-a83c-67b9672dea55\",
    \"user_id\": \"0457afee-aac4-31ad-add2-81b3961e276c\",
    \"status_id\": \"0d40f601-7812-3f80-82b0-e250607b7b77\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"287fc62c-f850-32d5-8a7f-7f1e47a82fca\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer 65hegZbd3P6fD4vk8Va1aEc",
    "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": "179a3589-158c-37f8-9edd-704685ca5ad9",
    "work_location_id": "0feb45fe-0d45-393e-a83c-67b9672dea55",
    "user_id": "0457afee-aac4-31ad-add2-81b3961e276c",
    "status_id": "0d40f601-7812-3f80-82b0-e250607b7b77",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "287fc62c-f850-32d5-8a7f-7f1e47a82fca"
};

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

Example response (200):


{
    "data": [
        {
            "id": "29c42b32-b61c-3a6b-89b9-67b022c47b86",
            "code": null,
            "name": "Vero omnis delectus.",
            "description": null,
            "work": {
                "id": "a2649dff-3876-4644-9e8a-732e73c50dd1",
                "name": "Dr. Eliane Gabi Ramos Jr."
            },
            "user": {
                "id": "a2649dff-3b6a-4548-89ba-4d24a04c4e5f",
                "name": "Esperanza Corwin"
            },
            "status": {
                "id": "a2649dff-3d7f-4eaf-aa78-ad1e7ec9bafb",
                "slug": null,
                "name": null,
                "description": "Srta. Simone Chaves Domingues",
                "abbreviation": "et",
                "color": "#fc73f6",
                "text_color": "#f9ad8c"
            },
            "priority": "high",
            "priority_label": "Alta",
            "needed_at": "2026-08-29",
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "026748e4-6508-31b9-8295-eb20fb288f67",
            "code": null,
            "name": "Nostrum placeat nobis temporibus.",
            "description": null,
            "work": {
                "id": "a2649dff-41bf-4d81-9ac4-e7234769e36e",
                "name": "Dr. Luna Poliana Alcantara"
            },
            "user": {
                "id": "a2649dff-44a3-4f6c-bbaa-72352a92a7d0",
                "name": "Theron Zieme"
            },
            "status": {
                "id": "a2649dff-46f3-474a-8cb8-2129006772ff",
                "slug": null,
                "name": null,
                "description": "Regina Zamana Filho",
                "abbreviation": "saepe",
                "color": "#547161",
                "text_color": "#e5508b"
            },
            "priority": "urgent",
            "priority_label": "Urgente",
            "needed_at": "2026-08-30",
            "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 65hegZbd3P6fD4vk8Va1aEc

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: 179a3589-158c-37f8-9edd-704685ca5ad9

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 0feb45fe-0d45-393e-a83c-67b9672dea55

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 0457afee-aac4-31ad-add2-81b3961e276c

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 0d40f601-7812-3f80-82b0-e250607b7b77

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: 287fc62c-f850-32d5-8a7f-7f1e47a82fca

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

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


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

Example response (200):


{
    "data": {
        "id": "fab95fd9-b8dd-36c8-96bd-40397e41a162",
        "code": null,
        "name": "Laudantium a ipsam.",
        "description": null,
        "work": {
            "id": "a2649dff-50ea-4164-a342-7a0cf5d125ca",
            "name": "Sr. Thiago Fonseca Santos"
        },
        "user": {
            "id": "a2649dff-5420-458b-b2fe-66ecec0599a1",
            "name": "Ted Runolfsson I"
        },
        "status": {
            "id": "a2649dff-562e-49c4-bf28-a9cfa318066b",
            "slug": null,
            "name": null,
            "description": "Kevin Delgado",
            "abbreviation": "et",
            "color": "#815266",
            "text_color": "#2a8297"
        },
        "priority": "low",
        "priority_label": "Baixa",
        "needed_at": "2026-08-23",
        "approved_at": null,
        "rejection_reason": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer vc6abPZ4ge36EDahdV18k5f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: magni

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/consequuntur/items" \
    --header "Authorization: Bearer 5g6bh13DPkvEfZV4c8aaed6" \
    --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/consequuntur/items"
);

const headers = {
    "Authorization": "Bearer 5g6bh13DPkvEfZV4c8aaed6",
    "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": "f886602d-b67f-3f5c-8816-9a78d50dde7f",
            "product": {
                "id": "a2649dff-71c7-4ede-9ef4-2a5b5e3720ae",
                "name": "Srta. Jaqueline Abreu",
                "code": "PRD-731826",
                "unit": {
                    "id": "a2649dff-701b-4fb1-8dbe-c78138d90cac",
                    "name": "Sr. Elias Ferreira Montenegro Sobrinho",
                    "abbreviation": "Milena Batista"
                }
            },
            "quantity": 761.8099,
            "quantity_fulfilled": 0,
            "quantity_pending": 761.8099,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Aut quas itaque placeat ut doloribus consequatur.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "317909e1-46c7-348c-8d9c-31e1d46cce60",
            "product": {
                "id": "a2649dff-841f-4ba9-bc21-47ee93768de2",
                "name": "Gabriela Sabrina D'ávila",
                "code": "PRD-861145",
                "unit": {
                    "id": "a2649dff-82d8-4c75-bae8-2d4baee5bccb",
                    "name": "Srta. Kamila Garcia Campos",
                    "abbreviation": "Dr. Maraisa Clara Delgado Neto"
                }
            },
            "quantity": 901.1748,
            "quantity_fulfilled": 0,
            "quantity_pending": 901.1748,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Quo repellendus quis nobis sint soluta totam non.",
            "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 5g6bh13DPkvEfZV4c8aaed6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: consequuntur

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 PbE8Z5v1f3ad6he6DcgV4ak" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"d0c2e269-e59c-3831-9fcb-e419cb7dfe04\",
    \"work_location_id\": \"2341df5c-35fb-3c0e-9cf2-6831fa9d29a4\",
    \"status_id\": \"c8cc1f4d-e019-3b63-b375-51a52c1e87f7\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"101e8597-460e-3818-b583-997536513a89\",
            \"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 PbE8Z5v1f3ad6he6DcgV4ak",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "d0c2e269-e59c-3831-9fcb-e419cb7dfe04",
    "work_location_id": "2341df5c-35fb-3c0e-9cf2-6831fa9d29a4",
    "status_id": "c8cc1f4d-e019-3b63-b375-51a52c1e87f7",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "101e8597-460e-3818-b583-997536513a89",
            "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 PbE8Z5v1f3ad6he6DcgV4ak

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: d0c2e269-e59c-3831-9fcb-e419cb7dfe04

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 2341df5c-35fb-3c0e-9cf2-6831fa9d29a4

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: c8cc1f4d-e019-3b63-b375-51a52c1e87f7

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: 101e8597-460e-3818-b583-997536513a89

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/consequatur" \
    --header "Authorization: Bearer 8daPg3ZE4V6v6hebfDk1c5a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"d7c8eb86-5e65-3907-a291-2329873f9e80\",
    \"work_location_id\": \"42d78aee-a954-359c-ae7f-a9d469a660ed\",
    \"status_id\": \"3e630d7c-7df6-3419-be9b-46401efbf99c\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"cc3abfaf-9cca-3394-9b23-cf483f50f2e3\",
            \"product_id\": \"2e5a9548-de19-37c4-8899-db2582c2b3d6\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/consequatur"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "d7c8eb86-5e65-3907-a291-2329873f9e80",
    "work_location_id": "42d78aee-a954-359c-ae7f-a9d469a660ed",
    "status_id": "3e630d7c-7df6-3419-be9b-46401efbf99c",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "cc3abfaf-9cca-3394-9b23-cf483f50f2e3",
            "product_id": "2e5a9548-de19-37c4-8899-db2582c2b3d6",
            "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 8daPg3ZE4V6v6hebfDk1c5a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: consequatur

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: d7c8eb86-5e65-3907-a291-2329873f9e80

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 42d78aee-a954-359c-ae7f-a9d469a660ed

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 3e630d7c-7df6-3419-be9b-46401efbf99c

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: cc3abfaf-9cca-3394-9b23-cf483f50f2e3

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 2e5a9548-de19-37c4-8899-db2582c2b3d6

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: animi

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: eveniet

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/libero/reject" \
    --header "Authorization: Bearer 8bVc4v56kae16gDPZfd3hEa" \
    --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/libero/reject"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: libero

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/quis/items" \
    --header "Authorization: Bearer fbkvhadV35E66ZcP81e4aDg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"9eee1f82-f857-3217-a65e-30902a1edc7a\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/quis/items"
);

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

let body = {
    "items": [
        {
            "product_id": "9eee1f82-f857-3217-a65e-30902a1edc7a",
            "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 fbkvhadV35E66ZcP81e4aDg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quis

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: 9eee1f82-f857-3217-a65e-30902a1edc7a

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/sed" \
    --header "Authorization: Bearer 5646kVDv3a1PZgbEfh8aecd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"caf13d53-5279-34c4-be2f-028aa41f5610\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/sed"
);

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

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "caf13d53-5279-34c4-be2f-028aa41f5610"
};

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 5646kVDv3a1PZgbEfh8aecd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: sed

item   string     

Product Request Item UUID Example: quos

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: caf13d53-5279-34c4-be2f-028aa41f5610

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/odio/items" \
    --header "Authorization: Bearer 3eg8hEPafbZdV16Dc6kv54a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"c7c8ddd1-407a-342b-8bc2-eeddd4d721f0\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/odio/items"
);

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

let body = {
    "items": [
        "c7c8ddd1-407a-342b-8bc2-eeddd4d721f0"
    ]
};

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 3eg8hEPafbZdV16Dc6kv54a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: odio

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/libero/sync-items" \
    --header "Authorization: Bearer g5c6fakDhVa68eb1P3E4Zvd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"e2f44562-b7c9-3872-bd76-bd0c9223ebb9\",
            \"product_id\": \"048621e8-eb35-3205-a461-5994e37bd8aa\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/libero/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "e2f44562-b7c9-3872-bd76-bd0c9223ebb9",
            "product_id": "048621e8-eb35-3205-a461-5994e37bd8aa",
            "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 g5c6fakDhVa68eb1P3E4Zvd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: libero

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: e2f44562-b7c9-3872-bd76-bd0c9223ebb9

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 048621e8-eb35-3205-a461-5994e37bd8aa

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

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "Brick",
    "code": "PROD-00003",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "f183e018-54f4-32a3-af86-870f5849164f",
            "name": "Gabi Vega Reis",
            "code": "PRD-227568",
            "stock": 331016987,
            "product_family": {
                "id": "a2649dfd-2a2d-4cf1-9552-5202ce119c47",
                "name": "Adriano Vega Rodrigues"
            },
            "product_brand": {
                "id": "a2649dfd-2c5c-4f2b-964e-b0eeb8ab030f",
                "name": "Allan Marin"
            },
            "unit": {
                "id": "a2649dfd-2e5d-4b16-91f4-f360cfe104db",
                "name": "Marco Luiz Azevedo Neto",
                "abbreviation": "Sr. Juan Garcia das Neves"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Optio illum et libero fuga rerum.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "573bcd6e-af6c-36aa-aec7-6a93133e3bfa",
            "name": "Dr. Henrique Adriel Faro",
            "code": "PRD-584368",
            "stock": 3777616,
            "product_family": {
                "id": "a2649dfd-321d-4ea0-aa26-7f24c261f9c5",
                "name": "Sr. Renato Rodrigo Soares"
            },
            "product_brand": {
                "id": "a2649dfd-33ba-42bf-b7bc-ea09094ffae5",
                "name": "Dr. Olívia Agatha Colaço Sobrinho"
            },
            "unit": {
                "id": "a2649dfd-3520-410e-a071-6700f672a7d6",
                "name": "Sr. Thomas Lovato Benez Neto",
                "abbreviation": "Sr. Juan Delvalle"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Reiciendis tenetur neque eaque non est sed.",
            "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 Zaa4Df5gk6dVvc6b1hePE83

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

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


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

Example response (200):


{
    "data": {
        "id": "73eb0d4c-8181-3bf7-bef9-3739fd997c1f",
        "name": "Thomas Júlio Vieira",
        "code": "PRD-631233",
        "stock": 152455,
        "product_family": {
            "id": "a2649dfd-40a5-4515-8988-8db23ac5e0af",
            "name": "Sra. Pâmela Emanuelly Amaral"
        },
        "product_brand": {
            "id": "a2649dfd-4261-48fb-b70e-bd9ee04d0dce",
            "name": "Paola Delgado Espinoza Filho"
        },
        "unit": {
            "id": "a2649dfd-4421-43de-b8e2-6ad5eb14e55f",
            "name": "Angélica Fidalgo Lutero Filho",
            "abbreviation": "Dr. Madalena Paes Filho"
        },
        "image": {
            "id": null,
            "url": null
        },
        "description": "Iure ipsam dolor occaecati voluptatem molestiae.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer 5DEvcVe4a68gPha1fZ3kb6d

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: enim

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 a5ave8cP36gbkZ61VDdh4Ef" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"6c46b491-9c05-3d53-88e0-3fff77d7b947\",
    \"product_brand_id\": \"9df3c600-bf71-365c-9eef-0f64d2102c6b\",
    \"unit_id\": \"6bece2c6-b2b2-3013-8e94-26cf5fc7524b\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "6c46b491-9c05-3d53-88e0-3fff77d7b947",
    "product_brand_id": "9df3c600-bf71-365c-9eef-0f64d2102c6b",
    "unit_id": "6bece2c6-b2b2-3013-8e94-26cf5fc7524b",
    "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 a5ave8cP36gbkZ61VDdh4Ef

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: 6c46b491-9c05-3d53-88e0-3fff77d7b947

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 9df3c600-bf71-365c-9eef-0f64d2102c6b

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: 6bece2c6-b2b2-3013-8e94-26cf5fc7524b

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 d6aDgvbahc5P64eV38Z1Ekf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"3d933757-fa5c-3940-b218-b43722d72485\",
    \"product_brand_id\": \"48401cf1-df76-39f9-b9a3-f59bbf1baba7\",
    \"unit_id\": \"200562c8-4992-34c0-be97-fa4f02263ad0\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "3d933757-fa5c-3940-b218-b43722d72485",
    "product_brand_id": "48401cf1-df76-39f9-b9a3-f59bbf1baba7",
    "unit_id": "200562c8-4992-34c0-be97-fa4f02263ad0",
    "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 d6aDgvbahc5P64eV38Z1Ekf

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

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: 3d933757-fa5c-3940-b218-b43722d72485

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 48401cf1-df76-39f9-b9a3-f59bbf1baba7

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: 200562c8-4992-34c0-be97-fa4f02263ad0

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: et

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/acb6ff35-9e08-3040-a48d-4ec3a22337f9/versions" \
    --header "Authorization: Bearer ED6kVfaeP54vh8Z6a1cbgd3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"Example Notes\",
    \"responsible_user_id\": \"dd9bf3c4-c556-3e4a-8dda-0c3002a8094e\",
    \"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/acb6ff35-9e08-3040-a48d-4ec3a22337f9/versions"
);

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

let body = {
    "notes": "Example Notes",
    "responsible_user_id": "dd9bf3c4-c556-3e4a-8dda-0c3002a8094e",
    "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 ED6kVfaeP54vh8Z6a1cbgd3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: acb6ff35-9e08-3040-a48d-4ec3a22337f9

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: dd9bf3c4-c556-3e4a-8dda-0c3002a8094e

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/7f089a35-197a-37cf-9afd-c1ee38bdc610/versions" \
    --header "Authorization: Bearer kbZ4eaE1d6h586cfVD3vgaP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/7f089a35-197a-37cf-9afd-c1ee38bdc610/versions"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 7f089a35-197a-37cf-9afd-c1ee38bdc610

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/8e4bba6c-d501-39da-b4e4-9e0b561d3c87" \
    --header "Authorization: Bearer E6eDgZfba4635adv8PVhc1k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/8e4bba6c-d501-39da-b4e4-9e0b561d3c87"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 8e4bba6c-d501-39da-b4e4-9e0b561d3c87

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/d4cd71a4-3e66-39db-9b66-8c14e5b01e1e/download" \
    --header "Authorization: Bearer 4a5ef38h6cdEaVDvk6gPZ1b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/d4cd71a4-3e66-39db-9b66-8c14e5b01e1e/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: d4cd71a4-3e66-39db-9b66-8c14e5b01e1e

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/aa5cabcb-2f5a-36a8-8a71-f92c313336de/restore" \
    --header "Authorization: Bearer va8a53E6b4c61hgfDVeZPdk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/aa5cabcb-2f5a-36a8-8a71-f92c313336de/restore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: aa5cabcb-2f5a-36a8-8a71-f92c313336de

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/d45fac90-1486-3834-b1eb-20faa4f3d829" \
    --header "Authorization: Bearer Ekge54d8b6aZvahDPfV316c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/d45fac90-1486-3834-b1eb-20faa4f3d829"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: d45fac90-1486-3834-b1eb-20faa4f3d829

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=d2213245-7ee4-3b17-9653-d3fb762cc55b&work_id=c54fc6c0-b691-35e8-ba1b-7ca24bc50d29&status_id=cfe63ce5-e5a6-3927-bb5b-07187cda1ff3&responsible_id=a33d1d6e-6a2e-3b48-b3d9-0340833118f3" \
    --header "Authorization: Bearer 3VEgh58ePvaDfZc4ka1d66b" \
    --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": "d2213245-7ee4-3b17-9653-d3fb762cc55b",
    "work_id": "c54fc6c0-b691-35e8-ba1b-7ca24bc50d29",
    "status_id": "cfe63ce5-e5a6-3927-bb5b-07187cda1ff3",
    "responsible_id": "a33d1d6e-6a2e-3b48-b3d9-0340833118f3",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "9c73f79b-f669-3204-9fb6-58d2b31c02b3",
            "name": "Quas ut aut",
            "description": "Sed sapiente incidunt quia qui magni.",
            "current_version": 1,
            "file": {
                "path": "projects/f64cf704-ac4b-320d-aa90-bd099f5cc161.pdf",
                "size": "3427476",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a2649e01-f7a8-4a46-98b3-66b4037309f2",
                "name": "Excepturi",
                "code": "JKA"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7937bcf7-b6e6-35c0-a7d9-a5e9614a3cb7",
            "name": "Ut voluptas sed",
            "description": "Ut voluptate maiores molestiae voluptatem totam id possimus.",
            "current_version": 1,
            "file": {
                "path": "projects/683bffed-f493-32ac-95f7-809715c3c16d.pdf",
                "size": "3545777",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a2649e01-fa5e-44c3-b34f-cefadb5c798e",
                "name": "Modi",
                "code": "LFH"
            },
            "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 3VEgh58ePvaDfZc4ka1d66b

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: d2213245-7ee4-3b17-9653-d3fb762cc55b

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: c54fc6c0-b691-35e8-ba1b-7ca24bc50d29

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: cfe63ce5-e5a6-3927-bb5b-07187cda1ff3

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: a33d1d6e-6a2e-3b48-b3d9-0340833118f3

Show project

requires authentication project show

Show a project

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

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


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

Example response (200):


{
    "data": {
        "id": "dea03048-0ec2-32b4-8edb-01db8183a780",
        "name": "Natus dolor rem",
        "description": "Blanditiis quos dolores inventore est rerum iste delectus.",
        "current_version": 1,
        "file": {
            "path": "projects/c6ff692d-fbce-3ecd-afa3-8731ceb01997.pdf",
            "size": "908927",
            "extension": "pdf"
        },
        "discipline": {
            "id": "a2649e02-01d5-4633-859f-8acc8ee14e56",
            "name": "Impedit",
            "code": "ALR"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/projects/{id}

Headers

Authorization        

Example: Bearer a835dfEVhD6eZcgkb4vaP61

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 7

project   string     

Project UUID Example: a

Create project

requires authentication project store

Create a new project and its first revision (R00)

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/projects" \
    --header "Authorization: Bearer 66Zhk8eavbgfcEdPa351V4D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"0f096a2d-6440-3bf7-a7c5-1a697abe8d51\",
    \"work_id\": \"20999932-aeb4-3038-baed-5cbd8b4cdbb9\",
    \"responsible_user_id\": \"57266379-9518-33aa-87f3-18427ef13447\",
    \"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 66Zhk8eavbgfcEdPa351V4D",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "0f096a2d-6440-3bf7-a7c5-1a697abe8d51",
    "work_id": "20999932-aeb4-3038-baed-5cbd8b4cdbb9",
    "responsible_user_id": "57266379-9518-33aa-87f3-18427ef13447",
    "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 66Zhk8eavbgfcEdPa351V4D

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: 0f096a2d-6440-3bf7-a7c5-1a697abe8d51

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: 20999932-aeb4-3038-baed-5cbd8b4cdbb9

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: 57266379-9518-33aa-87f3-18427ef13447

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/14" \
    --header "Authorization: Bearer dDh4aVa566e18Zfvk3PEbgc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"9a15f3fc-b345-3338-80e8-390d09d7bd60\",
    \"work_id\": \"fdda975b-190d-3fd2-a9ae-b236f8c481ac\",
    \"responsible_user_id\": \"2f1a7276-32ba-3c9a-9b56-2e5d48e8d2db\",
    \"status_id\": \"d0685686-bcfc-3a8a-98f1-e802e8e27901\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/14"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "9a15f3fc-b345-3338-80e8-390d09d7bd60",
    "work_id": "fdda975b-190d-3fd2-a9ae-b236f8c481ac",
    "responsible_user_id": "2f1a7276-32ba-3c9a-9b56-2e5d48e8d2db",
    "status_id": "d0685686-bcfc-3a8a-98f1-e802e8e27901"
};

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 dDh4aVa566e18Zfvk3PEbgc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 14

project   string     

Project UUID Example: nihil

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: 9a15f3fc-b345-3338-80e8-390d09d7bd60

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: fdda975b-190d-3fd2-a9ae-b236f8c481ac

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: 2f1a7276-32ba-3c9a-9b56-2e5d48e8d2db

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: d0685686-bcfc-3a8a-98f1-e802e8e27901

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project   string     

Project UUID Example: minima

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 3dP1fDEecZ6vg6Vkb54aha8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_log\": \"dolor\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);

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

let body = {
    "daily_log": "dolor"
};

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 3dP1fDEecZ6vg6Vkb54aha8

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

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 fZkDVdag684abPc5vE6e3h1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"culpa\",
    \"kit_uuid\": \"93109b73-a84e-3429-afba-854ad758a9ff\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);

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

let body = {
    "employee": "culpa",
    "kit_uuid": "93109b73-a84e-3429-afba-854ad758a9ff"
};

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 fZkDVdag684abPc5vE6e3h1

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

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

kit_uuid   string     

O campo value deve ser um UUID válido. Example: 93109b73-a84e-3429-afba-854ad758a9ff

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=quaerat&type=entrada&description=Commodi+iusto+hic+consequuntur+placeat+omnis+vero+aliquid+fugit.&categories[]=ca5f0fcb-be47-32ac-a0d9-bc6aebca7fd0&exclude_categories[]=c9dca2c9-0f83-3db0-8bea-b523b2c9a84e&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=64a1ac29-7aec-35db-a632-72dcd388c8dd&customers[]=c22b9d0b-7191-3a80-b2ea-3906c3e19719&suppliers[]=8bb49ee8-f044-3045-89bb-a7747780d902&cash_session=15f578fa-7abc-36be-a5d5-21c0f2b326a5&works[]=9c62edd9-074d-30eb-86e6-4ccdc6e1ad2b" \
    --header "Authorization: Bearer a51e3c68dPf46vbkZDEagVh" \
    --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": "quaerat",
    "type": "entrada",
    "description": "Commodi iusto hic consequuntur placeat omnis vero aliquid fugit.",
    "categories[0]": "ca5f0fcb-be47-32ac-a0d9-bc6aebca7fd0",
    "exclude_categories[0]": "c9dca2c9-0f83-3db0-8bea-b523b2c9a84e",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "64a1ac29-7aec-35db-a632-72dcd388c8dd",
    "customers[0]": "c22b9d0b-7191-3a80-b2ea-3906c3e19719",
    "suppliers[0]": "8bb49ee8-f044-3045-89bb-a7747780d902",
    "cash_session": "15f578fa-7abc-36be-a5d5-21c0f2b326a5",
    "works[0]": "9c62edd9-074d-30eb-86e6-4ccdc6e1ad2b",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: quaerat

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: Commodi iusto hic consequuntur placeat omnis vero aliquid fugit.

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: 15f578fa-7abc-36be-a5d5-21c0f2b326a5

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=officia&type=entrada&description=Perferendis+dolorem+officia+debitis+cumque+eligendi+numquam+quas+dolorem.&categories[]=7eff16c4-58e7-33f2-91ad-30930f09546e&exclude_categories[]=845187e2-7cc2-3d48-92bc-0d008860a40e&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=2f3631a2-8d75-32ee-89cf-e514bf752b20&customers[]=fa2d8d6e-e62f-3f68-870b-a4959f33bc59&suppliers[]=e0ae5591-8eb4-370b-aee1-60c26a4ccc9c&cash_session=18395255-8a87-31ce-a455-ca5a2e701796&works[]=433e63f5-48a4-3c35-aa17-63aff2530bf0" \
    --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": "officia",
    "type": "entrada",
    "description": "Perferendis dolorem officia debitis cumque eligendi numquam quas dolorem.",
    "categories[0]": "7eff16c4-58e7-33f2-91ad-30930f09546e",
    "exclude_categories[0]": "845187e2-7cc2-3d48-92bc-0d008860a40e",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "2f3631a2-8d75-32ee-89cf-e514bf752b20",
    "customers[0]": "fa2d8d6e-e62f-3f68-870b-a4959f33bc59",
    "suppliers[0]": "e0ae5591-8eb4-370b-aee1-60c26a4ccc9c",
    "cash_session": "18395255-8a87-31ce-a455-ca5a2e701796",
    "works[0]": "433e63f5-48a4-3c35-aa17-63aff2530bf0",
};
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: officia

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: Perferendis dolorem officia debitis cumque eligendi numquam quas dolorem.

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: 18395255-8a87-31ce-a455-ca5a2e701796

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 63h4aP8VE5bkdgeDf16avZc" \
    --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 63h4aP8VE5bkdgeDf16avZc",
    "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 63h4aP8VE5bkdgeDf16avZc

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


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

Example response (200):


{
    "data": [
        {
            "id": "64c3c8a0-0eb9-3331-9a8c-a555ca3a7118",
            "name": "amet non",
            "slug": null,
            "description": "Facere qui nostrum est perspiciatis nostrum veniam facilis. Dicta eos ut in vel quia quis laudantium. Iste veritatis repudiandae ut. Non earum dolores eveniet neque.",
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "873f2a44-e211-322c-83c2-670e79c4738c",
            "name": "quae corrupti",
            "slug": null,
            "description": null,
            "abbreviation": "vfk",
            "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 6P6fEha15gbd3V8a4eZDkvc

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

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

slug   string  optional    

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

description   string  optional    

Descrição. Example: Example Description

abbreviation   string  optional    

Abreviação. O campo value não pode ser superior a 10 caracteres. Example: Example Abbreviation

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. O campo value não pode ser superior a 255 caracteres. Example: Example Image path

url   string  optional    

URL da imagem. Must be a valid URL. Example: https://example.com

name   string  optional    

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

size   string  optional    

Tamanho da imagem. O campo value não pode ser superior a 50 caracteres. Example: Example Image size

extension   string  optional    

Extensão da imagem. O campo value não pode ser superior a 10 caracteres. Example: Example Image extension

Get sector

requires authentication sector show

Get a sector

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

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


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

Example response (200):


{
    "data": {
        "id": "4d32c603-504a-3675-a3fc-b2dfa09e5827",
        "name": "unde in",
        "slug": null,
        "description": "Dolores nemo quia quia. Sit minus labore modi officiis ut sint accusantium incidunt. Aut nesciunt sint eligendi voluptatum.",
        "abbreviation": "tqh",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer 16e3kb5cvDd6VfZ4Eag8Pah

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 15

sector   string     

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

Update sector

requires authentication sector update

Update a sector

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 10

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 12

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


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

Example response (200):


{
    "data": [
        {
            "id": "b100a1a9-c81f-3f0f-a055-f1dccfec5f1b",
            "name": "Kaylin Bosco",
            "username": "ekoch",
            "email": "hansen.brooks@example.com",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "c485f8cc-e94a-37c9-b688-3323a87326a7",
            "name": "Miss Jaida Jenkins I",
            "username": "cathrine39",
            "email": "aolson@example.com",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/sectors/{sector}/users

Headers

Authorization        

Example: Bearer Z1kcE6avVfP6a38gD5hde4b

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 ah3v4E68becDkgVaPd6Z5f1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"739566e6-96fe-3896-90bb-8c1dd5c0656e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "739566e6-96fe-3896-90bb-8c1dd5c0656e"
    ]
};

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 ah3v4E68becDkgVaPd6Z5f1

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 Dvgf18e6a4P3Z5EhcdV6abk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"3eb99d7a-9e29-303f-99ac-e1a15e736846\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "3eb99d7a-9e29-303f-99ac-e1a15e736846"
    ]
};

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 Dvgf18e6a4P3Z5EhcdV6abk

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 D1efvkbdVcaa6Z86gE54hP3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"0f884e1b-c15e-3729-b20a-91bce308f170\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "0f884e1b-c15e-3729-b20a-91bce308f170"
    ]
};

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 D1efvkbdVcaa6Z86gE54hP3

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


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

Example response (200):


{
    "data": [
        {
            "name": "ea sed",
            "slug": "nam-tempore-non-ea-aliquam"
        },
        {
            "name": "aut rerum",
            "slug": "similique-et-consequatur-eveniet-numquam-neque"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer 4e6aPZa36hv8d5VEkbgDf1c

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


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

Example response (200):


{
    "data": [
        {
            "id": "a4dc3c44-3c36-36ba-b362-657ea7bb365e",
            "slug": null,
            "name": null,
            "description": "Dayana Matos Padilha Jr.",
            "abbreviation": "consequatur",
            "color": "#7bfe3b",
            "text_color": "#cb5702",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "94efc916-015d-3aee-9855-b8239d801082",
            "slug": null,
            "name": null,
            "description": "Sra. Gabriela Aguiar D'ávila Jr.",
            "abbreviation": "harum",
            "color": "#f8d499",
            "text_color": "#2bd367",
            "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 43EaDvP6h61ZVefgbcda5k8

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 c6bDhe3dfaEVPaZ641gv58k" \
    --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\": \"286281b0-b201-3bb4-b1d7-185bf5086d13\",
    \"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 c6bDhe3dfaEVPaZ641gv58k",
    "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": "286281b0-b201-3bb4-b1d7-185bf5086d13",
    "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 c6bDhe3dfaEVPaZ641gv58k

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: 286281b0-b201-3bb4-b1d7-185bf5086d13

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


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

Example response (200):


{
    "data": {
        "id": "0567e26f-00e4-3c61-84b5-4ad35f9cbd80",
        "slug": null,
        "name": null,
        "description": "Dr. Carol Faria Godói Filho",
        "abbreviation": "non",
        "color": "#2f0f47",
        "text_color": "#36b6e0",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer 3a6h4a6fkZ5gPbEvV8deD1c

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 v8ePag3aEf51Vcd6k6Dh4Zb" \
    --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\": \"67457fa9-4013-35f3-acd4-e7c60d8299cc\",
    \"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 v8ePag3aEf51Vcd6k6Dh4Zb",
    "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": "67457fa9-4013-35f3-acd4-e7c60d8299cc",
    "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 v8ePag3aEf51Vcd6k6Dh4Zb

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: 67457fa9-4013-35f3-acd4-e7c60d8299cc

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "fbe92da3-a018-396e-b41f-f3d755bebb82",
            "quantity": 158.2086,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "af7c248e-6cfb-3fa3-9a8e-a7e2c57fcf44",
            "quantity": 465.927,
            "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 D3VeaacgP46d6hk8fb15vEZ

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


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

Example response (200):


{
    "data": [
        {
            "id": "74f18cf1-48f8-3496-845f-30ec96272e72",
            "name": "Estoque Zaragoça Comercial Ltda.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6cdf84eb-aaf4-30d5-b7c3-c35052dfea1b",
            "name": "Estoque Bonilha e Esteves Ltda.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/stocks

Headers

Authorization        

Example: Bearer kh5av416ebf3da68VDcZgPE

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 PV45hb68gEd36efv1aZDcak" \
    --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 PV45hb68gEd36efv1aZDcak",
    "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": "232e30eb-ba0d-3fd1-ad12-a739435dfb5e",
        "name": "Estoque Vasques e Valdez Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer PV45hb68gEd36efv1aZDcak

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


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

Example response (200):


{
    "data": {
        "id": "7f1e8322-c4cf-3e7e-ac8f-fb6dd4d0e522",
        "name": "Estoque Flores 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 8a46VgPeDkafdvZEhc13b56

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


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

Example response (200):


{
    "data": {
        "id": "1c68df92-f009-3e18-998c-6d10f2a7f760",
        "name": "Estoque Caldeira Comercial Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer e3DZkd18bgf4va5V6chaEP6

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 akh3g8456avVdbPc61eZEDf" \
    --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 akh3g8456avVdbPc61eZEDf",
    "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": "c14f5e62-3b32-36f9-98c1-c35f18b2ec2f",
        "name": "Estoque Zamana e Tamoio Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/stocks/{id}

Headers

Authorization        

Example: Bearer akh3g8456avVdbPc61eZEDf

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 36bVDkE6ac8a5ZgP1def4hv" \
    --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 36bVDkE6ac8a5ZgP1def4hv",
    "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 36bVDkE6ac8a5ZgP1def4hv

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


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

Example response (200):


{
    "data": [
        {
            "id": "243dcd43-f045-305a-a78e-44d30f17f714",
            "quantity": 593.7216,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "57da5412-6c33-3af6-a764-a5b0a091f49a",
            "quantity": 514.355,
            "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 1PVeZ8fhdkE5avDgbac6634

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

const headers = {
    "Authorization": "Bearer ec3v6EDVab1fP64dgah8Z5k",
    "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": "c447207a-69bf-31e6-a6dc-a151e97b1bde",
        "quantity": 84.8344,
        "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 ec3v6EDVab1fP64dgah8Z5k

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "4473e8c9-b906-3899-b55d-48e7568b43a7",
            "code": "MOV-482746",
            "type": "ajuste saída",
            "type_name": "ADJUSTMENT_OUT",
            "is_entry": false,
            "is_exit": true,
            "quantity": 43.1537,
            "previous_quantity": 900.9077,
            "new_quantity": 857.754,
            "reason": "Corporis sunt repellendus qui libero.",
            "movement_date": "2026-07-22T13:07:46.000000Z",
            "created_at": null
        },
        {
            "id": "8d2670a0-56f5-3b21-ac01-65e992532726",
            "code": "MOV-506295",
            "type": "entrada transferência",
            "type_name": "TRANSFER_IN",
            "is_entry": true,
            "is_exit": false,
            "quantity": 47.489,
            "previous_quantity": 611.1492,
            "new_quantity": 658.6382,
            "reason": null,
            "movement_date": "2026-07-26T06:20:30.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 k6Eh8f45VZPDvcb6eadga31

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 6D35cdhEv6kaaf4VP18Zbeg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"f3f855d2-7cf0-3d2e-b621-d8152c5a1155\",
    \"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 6D35cdhEv6kaaf4VP18Zbeg",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "f3f855d2-7cf0-3d2e-b621-d8152c5a1155",
    "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": "e87e523f-827a-3995-8524-c542356220b3",
        "code": "MOV-241720",
        "type": "vencido",
        "type_name": "EXPIRED",
        "is_entry": false,
        "is_exit": true,
        "quantity": 89.1322,
        "previous_quantity": 596.2525,
        "new_quantity": 507.1203,
        "reason": null,
        "movement_date": "2026-07-18T03:36:31.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer 6D35cdhEv6kaaf4VP18Zbeg

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: f3f855d2-7cf0-3d2e-b621-d8152c5a1155

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 6dZbavck1EgPVa3D48h5e6f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"aaff65df-64c6-3859-9264-bc59d81ccb61\",
    \"destination_stock_id\": \"886fb795-803c-3034-ac24-cd0a0131073a\",
    \"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 6dZbavck1EgPVa3D48h5e6f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "aaff65df-64c6-3859-9264-bc59d81ccb61",
    "destination_stock_id": "886fb795-803c-3034-ac24-cd0a0131073a",
    "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": "0cd2725f-3f4f-3e2d-a024-36a6291ff6f7",
        "code": "MOV-777099",
        "type": "vencido",
        "type_name": "EXPIRED",
        "is_entry": false,
        "is_exit": true,
        "quantity": 32.0393,
        "previous_quantity": 114.1461,
        "new_quantity": 82.1068,
        "reason": "Laborum eum ratione nihil aliquam fugiat ratione incidunt.",
        "movement_date": "2026-07-11T05:31:09.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer 6dZbavck1EgPVa3D48h5e6f

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: aaff65df-64c6-3859-9264-bc59d81ccb61

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: 886fb795-803c-3034-ac24-cd0a0131073a

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 eVdgE4Z86fa63hDc5P1bvka" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"b2aa31f7-9047-319d-af20-2eb0f0853a1f\",
    \"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 eVdgE4Z86fa63hDc5P1bvka",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "b2aa31f7-9047-319d-af20-2eb0f0853a1f",
    "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": "1320a87c-224b-31f8-9513-0c56c214390d",
        "code": "MOV-251329",
        "type": "consumo",
        "type_name": "CONSUMPTION",
        "is_entry": false,
        "is_exit": true,
        "quantity": 75.8175,
        "previous_quantity": 382.813,
        "new_quantity": 306.9955,
        "reason": "Aut laborum velit quibusdam qui.",
        "movement_date": "2026-07-28T21:45:17.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/inventory

Headers

Authorization        

Example: Bearer eVdgE4Z86fa63hDc5P1bvka

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: b2aa31f7-9047-319d-af20-2eb0f0853a1f

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 8avEb61gkcf3ePh45DZa6dV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"8322e9d6-0bae-3d33-815e-41ac19846e63\",
    \"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 8avEb61gkcf3ePh45DZa6dV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "8322e9d6-0bae-3d33-815e-41ac19846e63",
    "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": "8692334a-24fd-3ac3-88df-8bad6ad01a65",
        "code": "MOV-683887",
        "type": "vencido",
        "type_name": "EXPIRED",
        "is_entry": false,
        "is_exit": true,
        "quantity": 8.8266,
        "previous_quantity": 745.1822,
        "new_quantity": 736.3556,
        "reason": "Eius tempore vitae nesciunt et ullam.",
        "movement_date": "2026-07-11T02:00:23.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stock-movements/purchase

Headers

Authorization        

Example: Bearer 8avEb61gkcf3ePh45DZa6dV

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: 8322e9d6-0bae-3d33-815e-41ac19846e63

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


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

Example response (200):


{
    "data": {
        "id": "a994aa9f-6297-32ef-898c-38fd23c2285d",
        "code": "MOV-342548",
        "type": "devolução",
        "type_name": "RETURN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 60.2666,
        "previous_quantity": 316.3314,
        "new_quantity": 376.598,
        "reason": null,
        "movement_date": "2026-07-20T07:56:31.000000Z",
        "created_at": null
    }
}
 

Request      

GET api/stock-movements/{movement}

Headers

Authorization        

Example: Bearer adPc64af83hEv65VDg1kZeb

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


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

Example response (200):


{
    "data": [
        {
            "id": "b5eb0d5d-48b6-3bf3-be6a-81a6997fca40",
            "name": "Dr. Stephanie Maiara Madeira",
            "email": "campos.kevin@example.net",
            "phone": "(12) 2374-4565",
            "document": "39.728.874/0001-03",
            "type": "pj",
            "responsible": "Dr. Alma Poliana Ferraz Jr.",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "0e3d421b-6fe8-3656-bc93-3e9ba3bdc122",
            "name": "Willian Alonso Casanova",
            "email": "inacio19@example.org",
            "phone": "(74) 3799-8545",
            "document": "19.251.854/0001-79",
            "type": "pj",
            "responsible": "Caio Valentin",
            "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 g4kbfde8DP561cV3ZaEvha6

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

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


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

Example response (200):


{
    "data": {
        "id": "fcf82269-bacf-3d3e-8653-b6191997f24b",
        "name": "Cristian Lovato Jimenes",
        "email": "santana.simon@example.net",
        "phone": "(43) 2465-9440",
        "document": "78.479.904/0001-39",
        "type": "pf",
        "responsible": "Dr. Micaela Lozano Aguiar",
        "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 c36EaV5bgDdPvZeah168kf4

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

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 66baZfDgdcav18Ve3h54kEP" \
    --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 66baZfDgdcav18Ve3h54kEP",
    "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 66baZfDgdcav18Ve3h54kEP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

supplier   string     

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

System Types

Endpoints for system types

System Types

requires authentication No specific permission required

Get the system types

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/system-types" \
    --header "Authorization: Bearer b61Z8ahed64gafk3vEDPV5c" \
    --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 b61Z8ahed64gafk3vEDPV5c",
    "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 b61Z8ahed64gafk3vEDPV5c

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


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

Example response (200):


{
    "data": [
        {
            "id": "fea61609-515e-37fd-b003-aad0b4360f20",
            "name": "Dr. Thomas William Ortega Filho",
            "description": "Hic nostrum eum tempore sequi dolores consectetur consequatur aspernatur. Et tempore accusantium quis sit. Beatae itaque possimus autem fugiat iusto commodi autem est.",
            "type": "entrada"
        },
        {
            "id": "4e3b1b5c-a457-34f7-bb35-7b75d2d29caa",
            "name": "Anita Soares Filho",
            "description": "Quos deleniti accusantium et occaecati non culpa maxime. Quis eius incidunt nesciunt accusamus omnis. At voluptatem fugit reiciendis repellat excepturi incidunt.",
            "type": "transferência"
        }
    ],
    "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 caD561ZEbV8ghaPdf3ke64v

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

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


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

Example response (200):


{
    "data": {
        "id": "e16a8ee9-a0c7-3ece-b8f2-f84ecfb37818",
        "name": "Vinícius Bernardo Lozano Filho",
        "description": "Hic cum vel consectetur ad recusandae unde doloremque. Placeat iste quia architecto quo id. Voluptates repudiandae inventore impedit id. Expedita corrupti molestiae rem.",
        "type": "ajuste saída"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer hbDPEcvZa13Vek654dagf86

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: voluptatum

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: distinctio

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: ab

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


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

Example response (200):


{
    "data": [
        {
            "id": "24c5427e-739b-3866-9ad1-9e1d7b36446c",
            "name": "Dr. Gabriel Samuel Bezerra Jr.",
            "abbreviation": "Diana Queirós das Neves Filho",
            "description": "Illo aut quia maiores sit.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "360cc620-6b4e-36a6-83c9-7980c48b3314",
            "name": "Maicon Balestero Maldonado Jr.",
            "abbreviation": "Sr. Rodolfo Flores Filho",
            "description": "Sit molestiae et qui.",
            "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 kvbg6adEZ5eV136Ph4fD8ac

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


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

Example response (200):


{
    "data": {
        "id": "c3164662-8144-3a5c-b650-2500d26eeb8d",
        "name": "Sr. Luan Galindo",
        "abbreviation": "Sr. Noel Barros Sanches Jr.",
        "description": "Qui doloribus et qui.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer EV65Zf8vaD1eacbkd46g3Ph

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: qui

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


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

Example response (200):


{
    "data": [
        {
            "id": "c527469c-51ae-358f-b357-2c4659c82bad",
            "name": "Dr. Kieran Purdy",
            "username": "ometz",
            "email": "maggio.edwin@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "43f6aee4-b1be-3e51-8b97-b68524883fa3",
            "name": "Lorenzo Morar",
            "username": "ernestine13",
            "email": "jacobs.lucy@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/users

Headers

Authorization        

Example: Bearer 6d6k3VZbP8f4cgv1aDeEha5

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


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

Example response (200):


{
    "data": {
        "id": "12963cf1-e3be-3218-905e-9274619fed98",
        "name": "Prof. Monte Howell",
        "username": "otilia65",
        "email": "kristy.kihn@example.net",
        "certification": null,
        "crea": null,
        "last_login_at": null,
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization        

Example: Bearer VdZbaav3P6h854Efk6e1Dgc

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 a3hka68E5PVgbcZ1Df6d4ev" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"brooke50\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"b372c1d5-65b7-3516-bd0a-d521a67fc27b\"
    ],
    \"roles\": [
        \"7f182316-6e00-325d-8f39-2fd2aa7013e9\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "brooke50",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "b372c1d5-65b7-3516-bd0a-d521a67fc27b"
    ],
    "roles": [
        "7f182316-6e00-325d-8f39-2fd2aa7013e9"
    ]
};

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 a3hka68E5PVgbcZ1Df6d4ev

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

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 g6PZb1afadkhV38e5Dc6E4v" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"fhodkiewicz\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"fe903222-4b37-38dd-a086-a610a86bcf51\"
    ],
    \"roles\": [
        \"1c6ea298-ff19-3fe4-aa1b-f54310798e52\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "fhodkiewicz",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "fe903222-4b37-38dd-a086-a610a86bcf51"
    ],
    "roles": [
        "1c6ea298-ff19-3fe4-aa1b-f54310798e52"
    ]
};

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 g6PZb1afadkhV38e5Dc6E4v

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

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

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

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 fa5Z66cd3DEega81Pv4Vhkb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"27c00d3c-e3c5-30a7-809c-b6917de68e86\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "27c00d3c-e3c5-30a7-809c-b6917de68e86"
    ]
};

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 fa5Z66cd3DEega81Pv4Vhkb

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "sit",
            "display_name": "Amet iste sequi sit enim harum expedita dignissimos."
        },
        {
            "id": null,
            "name": "neque",
            "display_name": "Maxime exercitationem iste quo."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer fdbZh8ea4P6gVkc65aEv3D1

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


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

Example response (200):


{
    "data": [
        {
            "id": "4a10f596-1d30-3214-b3ae-2bf8259c67c3",
            "description": "Dr. Fabiana Débora Ramos",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "17ece90a-1c3a-39f7-94b1-27035a951dd4",
            "description": "Srta. Emília Olívia Faria",
            "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 aVc81Dbv46gf5kda6EhZ3Pe

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 18aEDe43Pg6Vdkav5bhf6Zc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"050793bf-d757-3b96-a2a6-8143af84aaa0\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Example Description",
    "work_id": "050793bf-d757-3b96-a2a6-8143af84aaa0"
};

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 18aEDe43Pg6Vdkav5bhf6Zc

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: 050793bf-d757-3b96-a2a6-8143af84aaa0

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


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

Example response (200):


{
    "data": {
        "id": "32170ad3-2a6e-323a-aed9-554761f0822b",
        "description": "Sr. Santiago Manuel Galindo",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer Pck3a8fDd6v5Z641VaghEbe

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 63PcaEk485Z61dVvabfgheD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"17df3ddb-760a-3f04-bce4-86e41c615069\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Example Description",
    "work_id": "17df3ddb-760a-3f04-bce4-86e41c615069"
};

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

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: 17df3ddb-760a-3f04-bce4-86e41c615069

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "61a752bf-4ea5-34ad-83f3-81e66212b00f",
            "name": "Fabiano Quintana Matos",
            "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": "1999-05-27 04:34:09.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b507919a-bb5e-3377-bac6-ec1ff42e8555",
            "name": "Natal Romero Molina",
            "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": "2000-04-24 08:33:23.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 gVE8cZ66fkDhP3aaeb51vd4

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 5a4bg18cPEDeVdk6a6hZv3f" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"1c595616-272f-38e0-9d8c-b0f838b60280\",
    \"status_id\": \"7171e7ce-2258-38ce-ba63-eeafaabaf280\",
    \"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 5a4bg18cPEDeVdk6a6hZv3f",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "1c595616-272f-38e0-9d8c-b0f838b60280",
    "status_id": "7171e7ce-2258-38ce-ba63-eeafaabaf280",
    "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 5a4bg18cPEDeVdk6a6hZv3f

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: 1c595616-272f-38e0-9d8c-b0f838b60280

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: 7171e7ce-2258-38ce-ba63-eeafaabaf280

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


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

Example response (200):


{
    "data": {
        "id": "4642fd04-9c36-30be-a2a9-d29e2b71dbc0",
        "name": "Sra. Mirela Roberta Quintana Jr.",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents": [],
        "locations": [],
        "product_quantity_lists_count": 0,
        "product_quantity_list_items_count": 0,
        "product_requests_count": 0,
        "product_request_items_count": 0,
        "documents_count": 0,
        "locations_documents_count": 0,
        "total_documents_count": 0,
        "daily_logs_count": 0,
        "projects_count": 0,
        "started_at": {
            "date": "1987-01-03 03:38:18.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer cEf6hdgvVkaab68P45ZDe31

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 Efk5bc6V13d6P4egZaDhv8a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"b894e7fb-5763-3158-ba59-d559759ab5ee\",
    \"status_id\": \"07f319b3-c4c5-38f0-8e9b-ab3f2883141f\",
    \"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 Efk5bc6V13d6P4egZaDhv8a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "b894e7fb-5763-3158-ba59-d559759ab5ee",
    "status_id": "07f319b3-c4c5-38f0-8e9b-ab3f2883141f",
    "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 Efk5bc6V13d6P4egZaDhv8a

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: b894e7fb-5763-3158-ba59-d559759ab5ee

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: 07f319b3-c4c5-38f0-8e9b-ab3f2883141f

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 41aVbekafE58hPd36Dv6gZc" \
    --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 41aVbekafE58hPd36Dv6gZc",
    "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 41aVbekafE58hPd36Dv6gZc

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


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

Example response (200):


{
    "data": [
        {
            "id": "11465ecf-3c21-32ed-9534-79fcaf4f386c",
            "name": "Miss Eva Marks MD",
            "username": "cole.kaylah",
            "email": "hgrimes@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "a128a975-7db3-3658-9533-05da403f5e4e",
            "name": "Keanu Grimes",
            "username": "istokes",
            "email": "violette78@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/works/{work}/responsibles

Headers

Authorization        

Example: Bearer aPZDch65Evd6V1kag3e84bf

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 EDcZ4ev18bga5dkV6f3a6hP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"c8eda18a-cf38-3a8f-b187-b3d7e897da70\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

let body = {
    "users": [
        "c8eda18a-cf38-3a8f-b187-b3d7e897da70"
    ]
};

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 EDcZ4ev18bga5dkV6f3a6hP

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 b6ZaP3VekDv1cfhE6ga548d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"f1fae87c-c374-377e-b84b-edbf526c85f9\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

let body = {
    "users": [
        "f1fae87c-c374-377e-b84b-edbf526c85f9"
    ]
};

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 b6ZaP3VekDv1cfhE6ga548d

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 aDeZdgPb6v1cE38fVka645h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"9b137374-1242-35d1-915a-570cae511d74\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

let body = {
    "users": [
        "9b137374-1242-35d1-915a-570cae511d74"
    ]
};

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 aDeZdgPb6v1cE38fVka645h

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.