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


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

Example response (200):


{
    "data": [
        {
            "id": "99cc3fa7-c119-3ece-867b-6883f324b137",
            "name": "fugiat-6a9768c1cb230",
            "display_name": "Voluptatibus quibusdam aliquam mollitia voluptatem.",
            "permissions_count": null
        },
        {
            "id": "adcb5dc1-f46a-3c92-8862-782adf3bb7dc",
            "name": "esse-6a9768c1d3e5e",
            "display_name": "Natus illo totam aperiam voluptatem accusamus sed et.",
            "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 31gDZfPkE86V4bcedhva5a6

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 hVaf6ag65bdv43k1e8ZDcEP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"0cf69db8-99e3-3753-8ec8-5d0f7d4cfc9f\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "0cf69db8-99e3-3753-8ec8-5d0f7d4cfc9f"
    ]
};

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 hVaf6ag65bdv43k1e8ZDcEP

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 Dhdakv66cPZ58aeEb3gf41V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"d379375e-3daf-3fda-ac54-b2ac98e4aa2b\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "d379375e-3daf-3fda-ac54-b2ac98e4aa2b"
    ]
};

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 Dhdakv66cPZ58aeEb3gf41V

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


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

Example response (200):


{
    "data": {
        "id": "30cf40f0-ab7a-3c49-88ef-bb777d8e2373",
        "name": "est-6a9768c1ed225",
        "display_name": "Sapiente voluptate omnis debitis quo.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer EkP654ebfa3a6hV8gZdDv1c

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "perspiciatis",
            "display_name": "Accusamus ratione molestias maxime est tenetur."
        },
        {
            "id": null,
            "name": "exercitationem",
            "display_name": "Eum qui dignissimos quo voluptate magni."
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer DeE4cvkd3bf51aV8g6aZ6Ph

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "fuga",
            "display_name": "Dolores quod dolorem rem."
        },
        {
            "id": null,
            "name": "molestias",
            "display_name": "Vitae excepturi error voluptatem placeat fugit voluptatum."
        }
    ],
    "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 ek6f38hPZvbgcVD14aadE56

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

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "name": "odit",
        "display_name": "Non dignissimos voluptates suscipit."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer gkDa35eaZ4hV8f6Pv6bcE1d

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "6d95f1c1-d99d-3f05-8866-9993d76339d8",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 2158.54,
            "due_date": "2026-09-24T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Nulla corrupti accusantium iusto quia recusandae voluptates autem nostrum natus quisquam vero.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "tempore",
            "field2": 62,
            "field3": true,
            "notes": "Ut iusto eum cum dolor.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "2f5b02b2-b74e-3976-956f-2143fc852ba6",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 4024.01,
            "due_date": "2026-09-22T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Deleniti commodi earum praesentium blanditiis officiis sapiente occaecati quaerat.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "et",
            "field2": 98,
            "field3": false,
            "notes": "Doloremque rem rerum laborum.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer a15kfP3vbdc4D6E6gaV8Zeh

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

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

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

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[]=et&suppliers[]=et&works[]=veniam&statuses[]=a+protestar&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-09-01T21%3A07%3A30&protest_date_end=2026-09-01T21%3A07%3A30&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer E53geVPaaZk46fc18vdb6Dh" \
    --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]": "et",
    "suppliers[0]": "et",
    "works[0]": "veniam",
    "statuses[0]": "a protestar",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-09-01T21:07:30",
    "protest_date_end": "2026-09-01T21:07:30",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "bad7d836-56bf-39b9-a3e7-a94e9f9d687f",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 9411.76,
            "due_date": "2026-09-30T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Sit cupiditate aperiam quis aliquam ut dolor in aspernatur consequatur soluta aut eaque in.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "eos",
            "field2": 24,
            "field3": true,
            "notes": "Dolorem odio harum est eaque repellat vitae.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f447dc3a-9b9e-3cf7-b5d0-c9b2960f4aff",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 9487.88,
            "due_date": "2026-09-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": "Velit id quo aperiam facilis ipsam fugiat et eos cum debitis.",
            "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": 32,
            "field3": true,
            "notes": "Quia corrupti et est distinctio harum.",
            "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 E53geVPaaZk46fc18vdb6Dh

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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

Payment method. Example: cheque

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

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

date_end   string  optional    

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

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-01T21:07:30

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-01T21:07:30

has_protest   boolean  optional    

Example: true

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

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

List accounts payable receivable

requires authentication accounts-payable-receivable index

List all accounts payable receivable

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "7c726626-492c-3fed-9d77-ce92dc16d2cd",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 6029.41,
            "due_date": "2026-09-26T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Nobis illum occaecati neque dolorem eaque qui distinctio ad eveniet.",
            "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": "quaerat",
            "field2": 64,
            "field3": true,
            "notes": "Fugiat rerum ut similique beatae.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "1349aec9-d08f-3344-a75f-ba29a7ade1c6",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 1129.22,
            "due_date": "2026-09-27T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Omnis culpa eos sint amet aut blanditiis.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "labore",
            "field2": 25,
            "field3": true,
            "notes": "Est ea quaerat excepturi hic.",
            "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 cevPfaaZ436516VhD8bEdkg

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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

Payment method. Example: cheque

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

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

date_end   string  optional    

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

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-01T21:07:30

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-01T21:07:30

has_protest   boolean  optional    

Example: false

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

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

Create accounts payable receivable

requires authentication accounts-payable-receivable store

Create a new accounts payable receivable

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable" \
    --header "Authorization: Bearer hbeZa1568Ek4a3fP6vcDgVd" \
    --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\": \"1a55e67e-8fc9-31ec-8de3-8bd936b2ffb8\",
    \"customer_id\": \"9a415848-078d-3939-ba57-0478a8832036\",
    \"work_id\": \"d6d2c5d0-f84d-31b4-adb2-67f4a27415c8\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"2db4306d-9002-3efc-a390-43ec5b4f9e45\",
    \"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 hbeZa1568Ek4a3fP6vcDgVd",
    "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": "1a55e67e-8fc9-31ec-8de3-8bd936b2ffb8",
    "customer_id": "9a415848-078d-3939-ba57-0478a8832036",
    "work_id": "d6d2c5d0-f84d-31b4-adb2-67f4a27415c8",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "2db4306d-9002-3efc-a390-43ec5b4f9e45",
    "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 hbeZa1568Ek4a3fP6vcDgVd

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

Tipo. Example: Example Type

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

Forma de pagamento. Example: Example Payment method

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

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

amount   number     

Valor. Example: 1

description   string     

Descrição. Example: Example Description

supplier_id   string  optional    

Fornecedor. The uuid of an existing record in the suppliers table. Example: 1a55e67e-8fc9-31ec-8de3-8bd936b2ffb8

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: 9a415848-078d-3939-ba57-0478a8832036

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: d6d2c5d0-f84d-31b4-adb2-67f4a27415c8

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: 2db4306d-9002-3efc-a390-43ec5b4f9e45

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

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

let body = {
    "fiscal_document_id": "odit",
    "installment_ids": [
        "adipisci"
    ],
    "payment_method": "cheque",
    "work_id": "quam"
};

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 Eaa8gk4DVbc6f1h36ZPvde5

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

installment_ids   string[]  optional    

The uuid of an existing record in the fiscal_document_installments table.

payment_method   string  optional    

Example: cheque

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: voluptatibus

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

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


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

Example response (200):


{
    "data": {
        "id": "38c14b96-cd84-3ec5-8c7c-cf5ad3455334",
        "code": null,
        "type": "entrada",
        "payment_method": "boleto",
        "amount": 3393.44,
        "due_date": "2026-09-15T03: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": "Nisi molestiae voluptas ullam tempora sit odio nulla totam est illum ipsum.",
        "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": "impedit",
        "field2": 42,
        "field3": false,
        "notes": "Officia aliquid debitis itaque deleniti numquam.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer evVhaE54fb6a86kd3Z1PgcD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: cumque

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/laboriosam" \
    --header "Authorization: Bearer h6aVbdvD31Z6kg5cfeE84aP" \
    --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\": \"173d1648-e8ca-3194-b5fe-3f5716b01141\",
    \"customer_id\": \"6354274e-1a3e-3387-bc2d-b2cec33242dc\",
    \"work_id\": \"7ace88b5-0ef9-30c7-8c43-fbfcd108c667\",
    \"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\": \"4a3d4637-142f-3e05-ae8b-e0048fee86a1\",
    \"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/laboriosam"
);

const headers = {
    "Authorization": "Bearer h6aVbdvD31Z6kg5cfeE84aP",
    "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": "173d1648-e8ca-3194-b5fe-3f5716b01141",
    "customer_id": "6354274e-1a3e-3387-bc2d-b2cec33242dc",
    "work_id": "7ace88b5-0ef9-30c7-8c43-fbfcd108c667",
    "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": "4a3d4637-142f-3e05-ae8b-e0048fee86a1",
    "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 h6aVbdvD31Z6kg5cfeE84aP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: laboriosam

Body Parameters

type   string  optional    

Type. Example: Example Type

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

Payment method. Example: Example Payment method

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

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

amount   number  optional    

Amount. Example: 1

description   string  optional    

Description. Example: Example Description

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 173d1648-e8ca-3194-b5fe-3f5716b01141

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 6354274e-1a3e-3387-bc2d-b2cec33242dc

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 7ace88b5-0ef9-30c7-8c43-fbfcd108c667

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: 4a3d4637-142f-3e05-ae8b-e0048fee86a1

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: perferendis

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

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

let body = {
    "email": "schuster.herbert@example.net",
    "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: schuster.herbert@example.net

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


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

Example response (200):


{
    "data": {
        "id": "a05c57b8-1feb-352d-b9d6-e9b28a4fc456",
        "name": "Johan Spencer",
        "username": "adela.wunsch",
        "email": "thiel.sister@example.net",
        "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 8h36eEZP6gdaV1D5f4bkvac

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 8c6fEaDa3gdk1ZPVe5hv64b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"osinski.darwin\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"54f80bb1-65bc-377c-8f26-82dc6d9a7c8a\"
    ],
    \"roles\": [
        \"3f15b627-2955-3102-9ea0-fdb72ec81b77\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "osinski.darwin",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "54f80bb1-65bc-377c-8f26-82dc6d9a7c8a"
    ],
    "roles": [
        "3f15b627-2955-3102-9ea0-fdb72ec81b77"
    ]
};

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

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: osinski.darwin

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

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

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: explicabo

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: voluptas

Deposit into bank account

requires authentication bank-account deposit

Adds funds to a bank account

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/3/deposit" \
    --header "Authorization: Bearer E6Z6DcVadvk38e1gaPb5hf4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\",
    \"transaction_category_id\": \"Example Transaction category id\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/3/deposit"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 3

Body Parameters

amount   number     

Amount. Example: 1

description   string  optional    

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

transaction_date   string     

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

transaction_category_id   string  optional    

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

Withdraw from bank account

requires authentication bank-account withdraw

Removes funds from a bank account

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/6/withdraw" \
    --header "Authorization: Bearer E4f63edkPagvac8DV1Zhb65" \
    --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/6/withdraw"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 6

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 668b3ageEDZvc1adkfPhV54" \
    --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 668b3ageEDZvc1adkfPhV54",
    "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 668b3ageEDZvc1adkfPhV54

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


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

Example response (200):


{
    "data": {
        "id": "520cad93-18f3-398c-9bd2-de5905b93ea8",
        "agency": "0156",
        "account": "6967400-5",
        "type": "poupança",
        "balance": 9557.09,
        "holder_type": "pf",
        "alias": "repellat",
        "limit": 869.68,
        "available_balance": 10426.77,
        "used_limit": 0,
        "available_limit": 869.68,
        "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 3e5ahfD6k1VdEvP46cbZga8

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


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

Example response (200):


{
    "data": [
        {
            "id": "fe206ff4-2391-34cd-8d47-59444f0fe770",
            "agency": "7841",
            "account": "1226549-4",
            "type": "caixa",
            "balance": 2729.22,
            "holder_type": "pf",
            "alias": "porro",
            "limit": 7490.98,
            "available_balance": 10220.199999999999,
            "used_limit": 0,
            "available_limit": 7490.98,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "fb18a940-aef3-3d0e-8587-b7dc7c8472f0",
            "agency": "1484",
            "account": "6387884-6",
            "type": "corrente",
            "balance": 7172.18,
            "holder_type": "pj",
            "alias": "blanditiis",
            "limit": 7588.54,
            "available_balance": 14760.720000000001,
            "used_limit": 0,
            "available_limit": 7588.54,
            "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 8fe4bZEkvPgcaV15a3dD66h

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 gPdZ8hE5v6a1cV3ekf6a4Db" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"0836523-4\",
    \"bank_id\": \"7cf79868-eca0-3c07-8ef8-7cc21aeb5c0e\",
    \"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 gPdZ8hE5v6a1cV3ekf6a4Db",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "0836523-4",
    "bank_id": "7cf79868-eca0-3c07-8ef8-7cc21aeb5c0e",
    "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 gPdZ8hE5v6a1cV3ekf6a4Db

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 0836523-4

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: 7cf79868-eca0-3c07-8ef8-7cc21aeb5c0e

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/14" \
    --header "Authorization: Bearer 3PVfD6b4keEaZ61a8dvg5ch" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"0209324-1\",
    \"bank_id\": \"346196d3-22a8-3f88-9092-250b415d52be\",
    \"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/14"
);

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

let body = {
    "agency": "Example Agency",
    "account": "0209324-1",
    "bank_id": "346196d3-22a8-3f88-9092-250b415d52be",
    "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 3PVfD6b4keEaZ61a8dvg5ch

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 14

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 0209324-1

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: 346196d3-22a8-3f88-9092-250b415d52be

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

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


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

Example response (200):


{
    "data": {
        "id": "a15a8542-6933-389b-80c3-18da9618acde",
        "agency": "0563",
        "account": "0863576-5",
        "type": "corrente",
        "balance": 4694.87,
        "holder_type": "pj",
        "alias": "deserunt",
        "limit": 8727.49,
        "available_balance": 13422.36,
        "used_limit": 0,
        "available_limit": 8727.49,
        "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 kfhgdDvZ86E56aeb4PacV31

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 11

Delete bank account

requires authentication bank-account delete

Delete a bank account

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 12

Bank Statements

Endpoints for bank account statements (extrato bancário)

Bank statement summary

requires authentication bank-statement summary

Get aggregated summary for the period

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/11/statements/summary" \
    --header "Authorization: Bearer avDbZe6a56Vk38fhEcg1P4d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date_start\": \"2024-01-01\",
    \"date_end\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/11/statements/summary"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 11

Body Parameters

date_start   string  optional    

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

date_end   string  optional    

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

List bank statements

requires authentication bank-statement index

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

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/bank-accounts/8/statements" \
    --header "Authorization: Bearer ga5Pfhcab8eE6v1Zk6D4Vd3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"voluptas\",
    \"sort_desc\": false,
    \"page\": 18,
    \"per_page\": 11,
    \"q\": \"tylzwvwicxq\",
    \"type\": \"pagamento\",
    \"date_start\": \"2026-09-01T21:07:31\",
    \"date_end\": \"2096-10-19\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/8/statements"
);

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

let body = {
    "sort_by": "voluptas",
    "sort_desc": false,
    "page": 18,
    "per_page": 11,
    "q": "tylzwvwicxq",
    "type": "pagamento",
    "date_start": "2026-09-01T21:07:31",
    "date_end": "2096-10-19"
};

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 ga5Pfhcab8eE6v1Zk6D4Vd3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 8

Body Parameters

sort_by   string  optional    

Example: voluptas

sort_desc   boolean  optional    

Example: false

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

type   string  optional    

Example: pagamento

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

O campo value deve ser uma data válida. Example: 2026-09-01T21:07:31

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: 2096-10-19

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 8

bankStatement   string     

Example: sed

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


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

Example response (200):


{
    "data": [
        {
            "id": "cf715700-f4a4-3d94-aab4-6bbf5b27519b",
            "name": "Valente S.A.",
            "code": "301"
        },
        {
            "id": "24b2104c-e844-3892-aa0c-5a89a6ac4f60",
            "name": "Valente-Santos",
            "code": "167"
        }
    ],
    "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 aVcP3vgZ6eaf54db1E6hDk8

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

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

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


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

Example response (200):


{
    "data": {
        "id": "b42873af-b091-3745-917e-218fe0971211",
        "name": "Chaves e Filhos",
        "code": "14"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer fvea43bk5dDh1aPg6c86VZE

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

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

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=Ab+dolores+a+sed+non+id+et.&categories[]=voluptatibus&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=excepturi&customers[]=ullam&suppliers[]=autem&works[]=pariatur" \
    --header "Authorization: Bearer dbe4Za31g6vaP6EVh8kDf5c" \
    --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": "Ab dolores a sed non id et.",
    "categories[0]": "voluptatibus",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "excepturi",
    "customers[0]": "ullam",
    "suppliers[0]": "autem",
    "works[0]": "pariatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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: Ab dolores a sed non id et.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

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

date_end   string  optional    

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

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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=Voluptatem+eligendi+consequatur+eum+quibusdam+officiis+ipsam+dolor.&categories[]=sint&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=accusamus&customers[]=earum&suppliers[]=et&works[]=soluta" \
    --header "Authorization: Bearer 6feVgcZ5DEa4d8kPav3b1h6" \
    --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": "Voluptatem eligendi consequatur eum quibusdam officiis ipsam dolor.",
    "categories[0]": "sint",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "accusamus",
    "customers[0]": "earum",
    "suppliers[0]": "et",
    "works[0]": "soluta",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "958307e7-a39e-3021-92bd-7829cdb3f23b",
            "code": "FC-06788677",
            "type": "transferência",
            "amount": -8020.39,
            "description": "Itaque ad sed beatae voluptatibus sed.",
            "transaction_date": "2016-10-16T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "08530c04-da66-32b2-aacd-79d5903da0b9",
            "code": "FC-42305053",
            "type": "entrada",
            "amount": 4335.41,
            "description": "Veniam enim voluptatem totam fugiat dolorum dolor.",
            "transaction_date": "1972-02-14T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cash-flows

Headers

Authorization        

Example: Bearer 6feVgcZ5DEa4d8kPav3b1h6

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: Voluptatem eligendi consequatur eum quibusdam officiis ipsam dolor.

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 3vPV45bac6k1gf86EeDdhaZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"e9bc93d0-24bc-3f12-b4ac-01a7fcd9b7ec\",
    \"transaction_category_id\": \"efd00d76-22ed-3974-bd84-12c519f6cb09\",
    \"bank_account_id\": \"9ff6e15f-82b7-3fc9-a949-382269ae33d9\",
    \"customer_id\": \"fb0ec394-4d69-35bf-ab06-f709859050c4\",
    \"supplier_id\": \"ca559b62-bc9a-351c-b5cc-1e817b10717e\",
    \"work_id\": \"234cc27b-325f-3037-9782-cf40fbadd536\",
    \"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 3vPV45bac6k1gf86EeDdhaZ",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "e9bc93d0-24bc-3f12-b4ac-01a7fcd9b7ec",
    "transaction_category_id": "efd00d76-22ed-3974-bd84-12c519f6cb09",
    "bank_account_id": "9ff6e15f-82b7-3fc9-a949-382269ae33d9",
    "customer_id": "fb0ec394-4d69-35bf-ab06-f709859050c4",
    "supplier_id": "ca559b62-bc9a-351c-b5cc-1e817b10717e",
    "work_id": "234cc27b-325f-3037-9782-cf40fbadd536",
    "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 3vPV45bac6k1gf86EeDdhaZ

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: e9bc93d0-24bc-3f12-b4ac-01a7fcd9b7ec

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: efd00d76-22ed-3974-bd84-12c519f6cb09

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 9ff6e15f-82b7-3fc9-a949-382269ae33d9

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: fb0ec394-4d69-35bf-ab06-f709859050c4

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: ca559b62-bc9a-351c-b5cc-1e817b10717e

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 234cc27b-325f-3037-9782-cf40fbadd536

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

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


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

Example response (200):


{
    "data": {
        "id": "d26cb228-d9a7-39e1-b4dd-eb342ae0d5a4",
        "code": "FC-42541203",
        "type": "tarifa",
        "amount": -5830.76,
        "description": "Sequi non velit nam libero.",
        "transaction_date": "1994-03-03T03: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 acVf35aPEDkhZd46bgve816

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 16

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/14" \
    --header "Authorization: Bearer 661af8h4k5EDPabcdZvVeg3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"8ac36bf5-723b-325c-83e0-e502daf1b620\",
    \"transaction_category_id\": \"bc02f173-939c-3349-b3ae-d67731c8d2e7\",
    \"bank_account_id\": \"41eaf5bf-63f2-3754-a3d1-48d8a0585529\",
    \"customer_id\": \"152f26e2-9fef-3dc8-8425-ce3af7bf6165\",
    \"supplier_id\": \"38e1f9eb-4bdd-38ba-9d48-1e3d2e7f997b\",
    \"work_id\": \"c05a47dd-bc11-3866-b5e7-5b841e084f74\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/14"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "8ac36bf5-723b-325c-83e0-e502daf1b620",
    "transaction_category_id": "bc02f173-939c-3349-b3ae-d67731c8d2e7",
    "bank_account_id": "41eaf5bf-63f2-3754-a3d1-48d8a0585529",
    "customer_id": "152f26e2-9fef-3dc8-8425-ce3af7bf6165",
    "supplier_id": "38e1f9eb-4bdd-38ba-9d48-1e3d2e7f997b",
    "work_id": "c05a47dd-bc11-3866-b5e7-5b841e084f74",
    "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 661af8h4k5EDPabcdZvVeg3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 14

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: 8ac36bf5-723b-325c-83e0-e502daf1b620

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: bc02f173-939c-3349-b3ae-d67731c8d2e7

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 41eaf5bf-63f2-3754-a3d1-48d8a0585529

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 152f26e2-9fef-3dc8-8425-ce3af7bf6165

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 38e1f9eb-4bdd-38ba-9d48-1e3d2e7f997b

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: c05a47dd-bc11-3866-b5e7-5b841e084f74

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 4

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


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

Example response (200):


{
    "data": [
        {
            "id": "494a07cf-5842-3e55-8c79-711ad634471c",
            "code": null,
            "opened_by": null,
            "opened_at": "2020-07-04T16:39:28.000000Z",
            "closed_by": null,
            "closed_at": "1976-04-15T17:56:47.000000Z",
            "opening_balance": 3179.81,
            "closing_balance": 9403.11,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "2019-08-27T13:25:36.000000Z",
            "updated_at": "2014-04-07T02:35:14.000000Z"
        },
        {
            "id": "a15f70b9-59fa-30e2-9c06-3a478c67f134",
            "code": null,
            "opened_by": null,
            "opened_at": "1985-11-17T04:11:17.000000Z",
            "closed_by": null,
            "closed_at": "2010-01-09T03:58:52.000000Z",
            "opening_balance": 3469.01,
            "closing_balance": 3553.97,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "1976-08-22T15:22:43.000000Z",
            "updated_at": "1986-07-02T23:51:51.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 gPfZa54ve6D1Vhadk63cE8b

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


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

Example response (200):


{
    "data": {
        "id": "5eeda3ba-b284-3a7f-827c-d233ef4d5a4f",
        "code": null,
        "opened_by": null,
        "opened_at": "2005-09-26T12:17:36.000000Z",
        "closed_by": null,
        "closed_at": "1986-02-04T11:47:39.000000Z",
        "opening_balance": 4430.1,
        "closing_balance": 6960.73,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "1991-07-31T15:23:16.000000Z",
        "updated_at": "2017-07-20T09:51:35.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer DVead5gZck4vfPab61h83E6

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/c9912d4f-5304-303a-8c13-bd3b866b4369" \
    --header "Authorization: Bearer Pf6Z1kVvdahc4eb63g5ED8a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/c9912d4f-5304-303a-8c13-bd3b866b4369"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: c9912d4f-5304-303a-8c13-bd3b866b4369

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/1585d034-bd61-3d03-b7a3-a1be186e8455/account-snapshot" \
    --header "Authorization: Bearer Zde6vVDa34618hkEcbg5faP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/1585d034-bd61-3d03-b7a3-a1be186e8455/account-snapshot"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 1585d034-bd61-3d03-b7a3-a1be186e8455

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/b439c885-4827-3f49-b37b-9bfa15702885" \
    --header "Authorization: Bearer g1VaZv5hbPEke66aDfd3c84" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/b439c885-4827-3f49-b37b-9bfa15702885"
);

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


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

Example response (200):


{
    "data": {
        "id": "b1496342-6291-31df-9154-dda1d7395560",
        "code": null,
        "opened_by": null,
        "opened_at": "2011-11-30T09:14:56.000000Z",
        "closed_by": null,
        "closed_at": "1989-12-18T22:01:01.000000Z",
        "opening_balance": 5003.46,
        "closing_balance": 433.46,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "hasSnapshot": false,
        "created_at": "2023-09-27T16:51:50.000000Z",
        "updated_at": "1982-12-24T16:14:35.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer g1VaZv5hbPEke66aDfd3c84

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: b439c885-4827-3f49-b37b-9bfa15702885

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/1b1e2264-e56f-3dd7-a483-128998b6551d" \
    --header "Authorization: Bearer kfebd38VacPg451Dh6vZa6E" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/1b1e2264-e56f-3dd7-a483-128998b6551d"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 1b1e2264-e56f-3dd7-a483-128998b6551d

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 aZefDP564agkcv8d36bV1hE" \
    --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\": \"88b6c124-c01e-3070-b48c-c9f3d0a1bf43\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts"
);

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

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "88b6c124-c01e-3070-b48c-c9f3d0a1bf43"
};

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

Example response (200):


{
    "data": [
        {
            "id": "d197f6ed-d2ca-3b14-86ff-0bd7f512fa64",
            "number": "928/2026",
            "started_at": "2026-09-01",
            "deadline_at": "2027-09-01",
            "work": {
                "id": "a2a5483b-a029-44f6-ab0a-d9088cf4c495",
                "name": "Srta. Dayane Carmona Molina"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f0a36880-864d-35ce-8b4d-ec79e0485538",
            "number": "205/2026",
            "started_at": "2026-09-01",
            "deadline_at": "2027-09-01",
            "work": {
                "id": "a2a5483b-b899-4d93-bc7b-c46ec6d6db9a",
                "name": "Micaela Yohanna Pena 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/contracts

Headers

Authorization        

Example: Bearer aZefDP564agkcv8d36bV1hE

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: 88b6c124-c01e-3070-b48c-c9f3d0a1bf43

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 hbk563a6V1dD4EZcvegP8af" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_id\": \"b3db494b-3ab7-32fa-9c81-19bdfde5cff9\",
    \"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 hbk563a6V1dD4EZcvegP8af",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_id": "b3db494b-3ab7-32fa-9c81-19bdfde5cff9",
    "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 hbk563a6V1dD4EZcvegP8af

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: b3db494b-3ab7-32fa-9c81-19bdfde5cff9

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

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


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

Example response (200):


{
    "data": {
        "id": "3d7b2717-f434-3eff-9acf-d23a89171fa1",
        "number": "197/2026",
        "started_at": "2026-09-01",
        "deadline_at": "2027-09-01",
        "work": {
            "id": "a2a5483b-c8d4-4a37-9337-66dd663357c9",
            "name": "Sr. Heitor Demian Paes Filho"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/contracts/{id}

Headers

Authorization        

Example: Bearer dv8b16Ech6akD5VfegaZP43

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 17

contract   string     

Contract UUID Example: quis

Update contract

requires authentication contract update

Update a work contract

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 16

contract   string     

Contract UUID Example: ut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contract   string     

Contract UUID Example: et

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


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

Example response (200):


{
    "data": [
        {
            "id": "ba5f15d3-f7cf-3d8f-b54b-2a25fc921beb",
            "name": "Jéssica Andréia Leal Sobrinho",
            "email": "filipe.batista@example.com",
            "phone": "(67) 98022-9056",
            "document": "927.503.728-01",
            "type": "pj",
            "responsible": "Sr. Ian Cristóvão Deverso",
            "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": "b6f0cf82-747e-3c74-82a3-4e368373ad7a",
            "name": "Amélia Nicole Sepúlveda",
            "email": "dmendonca@example.net",
            "phone": "(42) 96956-8112",
            "document": "608.800.803-29",
            "type": "pf",
            "responsible": "Agatha Iasmin Valente",
            "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 g5Z6fDb46ePaacdEVkv18h3

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

email   string  optional    

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

phone   string  optional    

Telefone. Example: (11) 99999-9999

document   string     

CPF/CNPJ. Example: Example Document

type   string     

Tipo. Example: Example Type

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

Responsável. Example: Example Responsible

image   object  optional    

Imagem.

path   string  optional    

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

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

address   object     

Endereço.

street   string     

Rua. Example: Example Address street

number   string     

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string     

Bairro. Example: Example Address neighborhood

city   string     

Cidade. Example: Example Address city

state   string     

Estado. Example: Example Address state

zip_code   string     

CEP. Example: Example Address zip code

Get customer

requires authentication customers index

Get a customer

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

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


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

Example response (200):


{
    "data": {
        "id": "f4bac3e2-c800-3f27-9983-8bfa74e68dba",
        "name": "Letícia Pacheco",
        "email": "hdacruz@example.com",
        "phone": "(48) 4977-6274",
        "document": "869.120.384-68",
        "type": "pj",
        "responsible": "Rebeca Isabella Roque",
        "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 38D14aP5kZV6avEfg6bched

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 4

customer   string     

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

Update customer

requires authentication customers update

Update a customer

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 12

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 85eZgdfav4P6bcak3h1VD6E" \
    --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 85eZgdfav4P6bcak3h1VD6E",
    "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 85eZgdfav4P6bcak3h1VD6E

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 bc5kVe3fDaag6EPv4hd81Z6" \
    --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\": \"04516491-5420-3556-ba5e-1509e4dc6141\",
    \"contract_id\": \"6c386ade-70be-3d45-a566-ca9769c3c32b\",
    \"status_id\": \"471255bd-a989-37aa-bb12-477bc51d4bbf\",
    \"filled_by\": \"1a80be16-de36-3c23-9d15-a610ef9cbd8c\",
    \"responsible_id\": \"ddcd760a-6a16-34d0-a3f3-154a9b3c2b12\",
    \"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 bc5kVe3fDaag6EPv4hd81Z6",
    "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": "04516491-5420-3556-ba5e-1509e4dc6141",
    "contract_id": "6c386ade-70be-3d45-a566-ca9769c3c32b",
    "status_id": "471255bd-a989-37aa-bb12-477bc51d4bbf",
    "filled_by": "1a80be16-de36-3c23-9d15-a610ef9cbd8c",
    "responsible_id": "ddcd760a-6a16-34d0-a3f3-154a9b3c2b12",
    "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": "d27a31a4-b9e5-3f07-93f8-f5250de1a856",
            "code": "RDO-01-09-26",
            "report_number": 1,
            "date": "2026-09-01",
            "status": {
                "id": "a2a5483c-2f86-4db6-98b3-22173a3bcf50",
                "slug": null,
                "name": null,
                "abbreviation": "molestias",
                "color": "#b445a3",
                "text_color": "#70052f"
            },
            "work": {
                "id": "a2a5483c-24e1-4386-82a6-7632ed8b4a89",
                "name": "Adriano Mário Mendes",
                "started_at": "2001-11-06 08:49:30"
            },
            "filled_by": {
                "id": "a2a5483c-2b8f-477e-a6bc-26ef45b42e0a",
                "name": "Clemens Dach"
            },
            "contract_number": "485/2026",
            "deadline_at": "2027-09-01",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "has_signed_document": false,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "038c1166-6eae-3fd3-b2ab-6223b32b3e14",
            "code": "RDO-01-09-26",
            "report_number": 1,
            "date": "2026-09-01",
            "status": {
                "id": "a2a5483c-3b46-47e9-bf74-a44732aed932",
                "slug": null,
                "name": null,
                "abbreviation": "magnam",
                "color": "#ae278d",
                "text_color": "#998763"
            },
            "work": {
                "id": "a2a5483c-3472-43a4-8f83-de5f21cea15d",
                "name": "Sr. Gean Fabiano Leal Jr.",
                "started_at": "1990-05-30 08:57:11"
            },
            "filled_by": {
                "id": "a2a5483c-3934-4e68-a12b-6fdd4fc42c9e",
                "name": "Buster Mante"
            },
            "contract_number": "547/2026",
            "deadline_at": "2027-09-01",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "has_signed_document": false,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/daily-logs

Headers

Authorization        

Example: Bearer bc5kVe3fDaag6EPv4hd81Z6

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: 04516491-5420-3556-ba5e-1509e4dc6141

contract_id   string  optional    

Contrato. The uuid of an existing record in the contracts table. Example: 6c386ade-70be-3d45-a566-ca9769c3c32b

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 471255bd-a989-37aa-bb12-477bc51d4bbf

filled_by   string  optional    

Preenchido por. The uuid of an existing record in the users table. Example: 1a80be16-de36-3c23-9d15-a610ef9cbd8c

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: ddcd760a-6a16-34d0-a3f3-154a9b3c2b12

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

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

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


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

Example response (200):


{
    "data": {
        "id": "9fa780ce-d374-3be8-9fc8-aef6e5d48951",
        "code": "RDO-01-09-26",
        "report_number": 1,
        "date": "2026-09-01",
        "status": {
            "id": "a2a5483c-5128-4466-8c0d-c361937863d0",
            "slug": null,
            "name": null,
            "abbreviation": "ut",
            "color": "#a8d75a",
            "text_color": "#c7fdc4"
        },
        "work": {
            "id": "a2a5483c-4a1a-45b1-8759-9117e0de7e6e",
            "name": "Diana Santiago Sobrinho",
            "started_at": "2016-10-07 02:38:35"
        },
        "filled_by": {
            "id": "a2a5483c-4f32-40a6-a124-850798882da5",
            "name": "Prof. Kali Armstrong"
        },
        "contract_number": "177/2026",
        "deadline_at": "2027-09-01",
        "technical_responsible": {
            "name": null,
            "certification": null,
            "crea": null
        },
        "activities": [],
        "occurrences": null,
        "next_day_forecast": null,
        "finalized_at": null,
        "has_signed_document": false,
        "content_hash": null,
        "gov_br_validation_url": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/daily-logs/{dailyLog}

Headers

Authorization        

Example: Bearer kgvd3eaEh6P51Z46DVcb8fa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: non

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 gf3VkehD15Z6Pc684abvadE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contract_id\": \"Example Contract id\",
    \"date\": \"2024-01-01\",
    \"status_id\": \"cd9913a5-64c8-32b2-b9ef-fe7283ea055d\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs"
);

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

let body = {
    "contract_id": "Example Contract id",
    "date": "2024-01-01",
    "status_id": "cd9913a5-64c8-32b2-b9ef-fe7283ea055d"
};

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 gf3VkehD15Z6Pc684abvadE

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: cd9913a5-64c8-32b2-b9ef-fe7283ea055d

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/aspernatur" \
    --header "Authorization: Bearer E8PeadaVg1cD6f4v6Z35kbh" \
    --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\": \"3121499c-6c3d-4e71-a442-bbb51c3d91eb\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/aspernatur"
);

const headers = {
    "Authorization": "Bearer E8PeadaVg1cD6f4v6Z35kbh",
    "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": "3121499c-6c3d-4e71-a442-bbb51c3d91eb",
            "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 E8PeadaVg1cD6f4v6Z35kbh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: aspernatur

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: 3121499c-6c3d-4e71-a442-bbb51c3d91eb

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: harum

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

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  optional    

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

Reopen daily log

requires authentication daily-log reopen

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

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

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


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

Example response (200):


{
    "data": "object"
}
 

Request      

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

Headers

Authorization        

Example: Bearer vk6ghacdZfP1a3bDV6458eE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: aut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: eum

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/delectus/photos/reiciendis" \
    --header "Authorization: Bearer evVd5P64a381g6EkZhbcafD" \
    --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/delectus/photos/reiciendis"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: delectus

id   string     

The ID of the photo. Example: reiciendis

photo   string     

Photo (File) UUID Example: officiis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: quia

photo   string     

Photo (File) UUID Example: veritatis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: dolor

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


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

Example response (200):


{
    "data": [
        {
            "id": "63d5f0b7-3342-3198-a0f9-40ba21116d53",
            "name": "Esse",
            "code": "HSD",
            "description": "Mollitia vero qui omnis quis.",
            "active": true
        },
        {
            "id": "e949580f-2c35-31aa-857b-24bf482020f8",
            "name": "Voluptatem",
            "code": "JQW",
            "description": "Dolore provident sequi aut aliquid vero voluptas aliquid fuga.",
            "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 Pa83Zegv6dEbVDa5k1c64fh

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


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

Example response (200):


{
    "data": {
        "id": "986dd496-4e17-308a-8b61-a9c4e72af30a",
        "name": "Ab",
        "code": "GTD",
        "description": "Error non aut ullam officia.",
        "active": true
    }
}
 

Request      

GET api/disciplines/{id}

Headers

Authorization        

Example: Bearer 5Vk6Ze6c4dfa1vaEbg83hDP

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

discipline   string     

Discipline UUID Example: temporibus

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


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

Example response (200):


{
    "data": [
        {
            "id": "0300b206-b30d-33f9-a0e6-c909b9620724",
            "name": "Sr. Flávio Inácio Guerra Filho",
            "description": "Voluptatem sed doloremque quis labore aut. Nobis id illum ad voluptatem vel quis illo. Quia animi omnis sit neque perspiciatis.",
            "module": "document"
        },
        {
            "id": "b09e6e51-960d-3317-99a9-0851da46b337",
            "name": "Eva Olívia Feliciano Jr.",
            "description": "Quod optio odio expedita. Reprehenderit dolor eum numquam. Aspernatur nobis qui est.",
            "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 Pbva53E6Da8hf4kdg6ZeVc1

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

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


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

Example response (200):


{
    "data": {
        "id": "b01ed9cd-d9e9-3d5d-b760-34b3d5354fe1",
        "name": "Sr. Luan Gian Paes",
        "description": "Voluptatem quia porro ipsam aliquid. Non aut quo qui consectetur laborum eveniet deserunt et. Voluptatibus cum quis rerum neque. Ut qui omnis quisquam voluptatibus exercitationem.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer DabgEZ1V865c34v6fadkheP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: ipsum

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: et

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: consequatur

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "baa20c43-432f-38a8-bc18-03129ea792b2",
            "name": "Sr. Ícaro Abreu Rico",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d521cd59-ef72-3b02-841b-784309ba634b",
            "name": "Denise Bella Verdara",
            "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 PZdhbEDk5egf31aa66Vcv84

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

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

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


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

Example response (200):


{
    "data": {
        "id": "bfff8dfa-c357-38c8-b0a8-8e2c8fa83ab7",
        "name": "Allan Garcia Domingues",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer 36h86aPg1vDEcZ4dke5afbV

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

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 f3Eg48aDP6eb1k6aZVh5vdc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"3ad8edf2-4bfd-3106-a5b9-44b89ce862fd\",
    \"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 f3Eg48aDP6eb1k6aZVh5vdc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "3ad8edf2-4bfd-3106-a5b9-44b89ce862fd",
    "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 f3Eg48aDP6eb1k6aZVh5vdc

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: 3ad8edf2-4bfd-3106-a5b9-44b89ce862fd

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/3" \
    --header "Authorization: Bearer vkc168DaZha3d46VbgfeE5P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"70a31c05-a79f-37b9-a054-20261e743034\",
    \"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/3"
);

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

let body = {
    "name": "Example Name",
    "category_id": "70a31c05-a79f-37b9-a054-20261e743034",
    "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 vkc168DaZha3d46VbgfeE5P

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 3

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: 70a31c05-a79f-37b9-a054-20261e743034

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

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

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

let body = {
    "q": "earum",
    "renewal_status": "completed",
    "urgency": "expires_30_days",
    "employee_id": "non",
    "epi_type_id": "perspiciatis"
};

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 E4bD8gfe1Phv6dc536kZaaV

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: earum

renewal_status   string  optional    

Example: completed

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

Example: expires_30_days

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

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

epi_type_id   string  optional    

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

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

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

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

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

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

Request      

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

Headers

Authorization        

Example: Bearer Dgca6bd3Z1Eah65ePkfV84v

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: voluptas

Body Parameters

quantity   integer  optional    

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

condition   string  optional    

Condição do EPI. Example: new

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

Example: true

Ignore EPI renewal

requires authentication employee-epi update

Ignore expiry alerts for an EPI delivery

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/epi-renewals/commodi/ignore" \
    --header "Authorization: Bearer D6a3kbV1vegf4ZdPa56Eh8c" \
    --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/commodi/ignore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: commodi

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: quia

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

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

let body = {
    "q": "dignissimos",
    "stock_id": "tempora"
};

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

Example response (200):


{
    "data": [
        {
            "id": "1dec2954-3099-35af-907f-afe584d8d02c",
            "name": "et aut",
            "default_validity_days": 511,
            "requires_signature": true,
            "numero_ca": "36310",
            "product": null,
            "available_quantity": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c9f9f9b4-a939-3209-8c88-b501452b7980",
            "name": "assumenda eveniet",
            "default_validity_days": 204,
            "requires_signature": true,
            "numero_ca": "45850",
            "product": null,
            "available_quantity": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/epi-types

Headers

Authorization        

Example: Bearer feV3acv8aE6gZk6PhbDd415

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: dignissimos

stock_id   string  optional    

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

List catalog products that could become EPI

requires authentication epi index

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

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

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

let body = {
    "q": "occaecati",
    "stock_id": "minima"
};

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

Example response (401):

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

{
    "message": "Unauthenticated."
}
 

Request      

GET api/epi-types/candidates

Headers

Authorization        

Example: Bearer EeV3dfchvaZ1akD4b66g85P

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: occaecati

stock_id   string  optional    

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

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

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


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

Example response (200):


{
    "data": {
        "id": "933a15af-c46a-3ff2-aa00-520e23b36f96",
        "name": "odit recusandae",
        "default_validity_days": 170,
        "requires_signature": true,
        "numero_ca": "26000",
        "product": null,
        "available_quantity": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer ae8P3v6kZgabEfcDd51V46h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: non

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 458haevbg63kVZPfacdE16D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"default_validity_days\": 1,
    \"requires_signature\": true,
    \"numero_ca\": \"Example Numero ca\",
    \"action\": \"Example Action\",
    \"product_id\": \"94840c17-2c3f-3ec4-8045-2d47599c6e14\",
    \"product_family_id\": \"adc6d882-6ff5-3400-8592-be9a429c7f09\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types"
);

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

let body = {
    "name": "Example Name",
    "default_validity_days": 1,
    "requires_signature": true,
    "numero_ca": "Example Numero ca",
    "action": "Example Action",
    "product_id": "94840c17-2c3f-3ec4-8045-2d47599c6e14",
    "product_family_id": "adc6d882-6ff5-3400-8592-be9a429c7f09"
};

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 458haevbg63kVZPfacdE16D

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

default_validity_days   integer     

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

requires_signature   boolean  optional    

Exige assinatura. Example: true

numero_ca   string  optional    

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

action   string     

Ação. Example: Example Action

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

Produto. This field is required when action is link_existing. The uuid of an existing record in the products table. Example: 94840c17-2c3f-3ec4-8045-2d47599c6e14

product_family_id   string  optional    

Família do produto. This field is required when action is create_new. The uuid of an existing record in the product_families table. Example: adc6d882-6ff5-3400-8592-be9a429c7f09

requires authentication epi update

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

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/epi-types/link-products" \
    --header "Authorization: Bearer bh6Daa836VP4ceEvZ51fdgk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"epi_type_id\": \"f964685f-623e-3382-b98e-fd46d16057ca\",
            \"action\": \"Example Items * action\",
            \"product_id\": \"3374d4fb-6679-357f-991a-a84451c618a2\",
            \"product_family_id\": \"c7ba4f12-a222-3920-bb86-95c521751942\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/link-products"
);

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

let body = {
    "items": [
        {
            "epi_type_id": "f964685f-623e-3382-b98e-fd46d16057ca",
            "action": "Example Items * action",
            "product_id": "3374d4fb-6679-357f-991a-a84451c618a2",
            "product_family_id": "c7ba4f12-a222-3920-bb86-95c521751942"
        },
        null
    ]
};

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

Link an EPI type to a catalog product

requires authentication epi update

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

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/epi-types/fugit/product" \
    --header "Authorization: Bearer 1V3edfPZg4ah6ck8vb6DaE5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"action\": \"Example Action\",
    \"product_id\": \"8cca1dd3-052a-3887-b06d-814d8be46be1\",
    \"product_family_id\": \"445f1162-e48c-3960-b263-e300b250d1b6\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/fugit/product"
);

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

let body = {
    "action": "Example Action",
    "product_id": "8cca1dd3-052a-3887-b06d-814d8be46be1",
    "product_family_id": "445f1162-e48c-3960-b263-e300b250d1b6"
};

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

Request      

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

Headers

Authorization        

Example: Bearer 1V3edfPZg4ah6ck8vb6DaE5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: fugit

Body Parameters

action   string     

Ação. Example: Example Action

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

Produto. This field is required when action is link_existing. The uuid of an existing record in the products table. Example: 8cca1dd3-052a-3887-b06d-814d8be46be1

product_family_id   string  optional    

Família do produto. This field is required when action is create_new. The uuid of an existing record in the product_families table. Example: 445f1162-e48c-3960-b263-e300b250d1b6

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

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

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

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

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer D1kdaP4f8hgveEZ66b5cVa3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: aliquam

Body Parameters

name   string     

Nome. Example: Example Name

default_validity_days   integer     

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

requires_signature   boolean  optional    

Exige assinatura. Example: true

numero_ca   string  optional    

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

Delete EPI type

requires authentication epi delete

Delete an EPI type

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: officiis

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


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

Example response (200):


{
    "data": [
        {
            "id": "46fdac3e-3da4-4947-b3fd-a1453b69b183",
            "name": "ipsa",
            "description": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "cd32b26f-4280-4294-8e10-f4ba09e685b8",
            "name": "beatae",
            "description": "Unde officiis soluta aut pariatur in.",
            "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 54kVe6daDa3hfZbgv8EP61c

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

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


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

Example response (200):


{
    "data": {
        "id": "23ffe034-abcc-40e5-b09c-463d26f59d00",
        "name": "vel",
        "description": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer vPhEfgk846badDVZ1e635ca

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: qui

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

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/debitis" \
    --header "Authorization: Bearer 56hdegb8ZcvPfEVaa3416Dk" \
    --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/debitis"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: debitis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: facere

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

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

let body = {
    "sort_by": "delivery_date",
    "sort_desc": true,
    "page": 41,
    "per_page": 12,
    "q": "aut",
    "employee_id": "laboriosam",
    "has_term": false
};

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

Example response (401):

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

{
    "message": "Unauthenticated."
}
 

Request      

GET api/epi-terms

Headers

Authorization        

Example: Bearer d5ZgefVabc814a6PkEh6vD3

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: delivery_date

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

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Example: aut

employee_id   string  optional    

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

has_term   boolean  optional    

Example: false

List employees

requires authentication employee index

List all employees

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employees?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva" \
    --header "Authorization: Bearer P66d4egh83bkVa1E5vaZDfc" \
    --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 P66d4egh83bkVa1E5vaZDfc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": [
        {
            "id": "f95453cc-dc18-47f4-aa91-3fd18b76b004",
            "name": "Sra. Naomi Caroline Delvalle",
            "cpf": "803.407.863-49",
            "rg": "403042878",
            "ctps": null,
            "phone": null,
            "birthdate": null,
            "email": "artur02@example.org",
            "pis_pasep": "27607525296",
            "admission_date": null,
            "daily_salary": "97.49",
            "monthly_salary": null,
            "nationality": "Honduras",
            "place_of_birth": "Santa Santiago",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a2a5483c-eee6-43c5-90ab-60441355c3f7",
                "name": "et"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "eaf2419e-582d-4e8d-8eb7-29ca8b7fb34a",
            "name": "Sr. Willian Sales Mascarenhas Jr.",
            "cpf": "339.987.150-93",
            "rg": "336003652",
            "ctps": "048955721",
            "phone": null,
            "birthdate": "1988-08-05T03:00:00.000000Z",
            "email": "ecampos@example.org",
            "pis_pasep": null,
            "admission_date": null,
            "daily_salary": null,
            "monthly_salary": "3723.76",
            "nationality": "Cazaquistão",
            "place_of_birth": "São Stephany do Leste",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a2a5483c-f343-423b-ada4-476811844f4c",
                "name": "nesciunt"
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": "/?page=40",
        "next": null
    },
    "meta": {
        "current_page": 41,
        "from": 401,
        "last_page": 1,
        "links": [
            {
                "url": "/?page=40",
                "label": "&laquo; Anterior",
                "page": 40,
                "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": 402,
        "total": 2
    }
}
 

Request      

GET api/employees

Headers

Authorization        

Example: Bearer P66d4egh83bkVa1E5vaZDfc

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

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


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

Example response (200):


{
    "data": {
        "id": "f30ced6b-a1d9-43da-a64a-ae51a5e05796",
        "name": "Isabelly Gabrielle Mendes Jr.",
        "cpf": "955.414.656-16",
        "rg": "879138667",
        "ctps": "860557343",
        "phone": null,
        "birthdate": null,
        "email": "souza.silvana@example.com",
        "pis_pasep": "10695304258",
        "admission_date": "2026-02-14T03:00:00.000000Z",
        "daily_salary": null,
        "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": "a2a5483c-fb85-42bc-a4c2-35b5d745edc0",
            "name": "a"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer 3c5h6aVdZgDEafkevbP6481

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

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 3P6ka48hfcdeZ51VDbEgva6" \
    --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\": \"26f8c391-4989-46c2-9f7f-c47b66c10104\",
    \"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 3P6ka48hfcdeZ51VDbEgva6",
    "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": "26f8c391-4989-46c2-9f7f-c47b66c10104",
    "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 3P6ka48hfcdeZ51VDbEgva6

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: 26f8c391-4989-46c2-9f7f-c47b66c10104

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/20" \
    --header "Authorization: Bearer vcD15gePVZaEak8hdb46f36" \
    --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\": \"72c96555-0aee-4926-b8a5-8614220f303d\",
    \"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/20"
);

const headers = {
    "Authorization": "Bearer vcD15gePVZaEak8hdb46f36",
    "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": "72c96555-0aee-4926-b8a5-8614220f303d",
    "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 vcD15gePVZaEak8hdb46f36

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 20

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: 72c96555-0aee-4926-b8a5-8614220f303d

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 4

employee   string     

Employee UUID Example: 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/20/bank-account" \
    --header "Authorization: Bearer 5d1PZDEk36acVv6ga8febh4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"ut\",
    \"agency\": \"wotdlgnh\",
    \"account\": \"ssboircktcozqmcvznxqkqseu\",
    \"account_type\": \"poupança\",
    \"pix_key\": \"zigtf\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/20/bank-account"
);

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

let body = {
    "bank_id": "ut",
    "agency": "wotdlgnh",
    "account": "ssboircktcozqmcvznxqkqseu",
    "account_type": "poupança",
    "pix_key": "zigtf",
    "favorite": false
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer 5d1PZDEk36acVv6ga8febh4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 20

employee   string     

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

Body Parameters

bank_id   string     

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

agency   string     

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

account   string     

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

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

favorite   boolean  optional    

Example: false

Update employee bank account

requires authentication employee-bank-account update

Update a bank account for an employee

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employees/11/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
    --header "Authorization: Bearer vfgdP6kcDV3E4168hbae5aZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"minus\",
    \"agency\": \"uhitjiwqvyxvizpg\",
    \"account\": \"izjzlaukcchkesguzqjlis\",
    \"account_type\": \"corrente\",
    \"pix_key\": \"otogtslkenmvg\",
    \"favorite\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/11/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);

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

let body = {
    "bank_id": "minus",
    "agency": "uhitjiwqvyxvizpg",
    "account": "izjzlaukcchkesguzqjlis",
    "account_type": "corrente",
    "pix_key": "otogtslkenmvg",
    "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 vfgdP6kcDV3E4168hbae5aZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 11

id   string     

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

employee   string     

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

Body Parameters

bank_id   string  optional    

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

agency   string  optional    

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

account   string  optional    

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

account_type   string  optional    

Example: corrente

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

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

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

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

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

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

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

Example response (401):

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

{
    "message": "Unauthenticated."
}
 

Request      

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

Headers

Authorization        

Example: Bearer cvha6EkVdgbDeZPaf145368

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 14

employee   string     

Employee UUID Example: iste

Body Parameters

q   string  optional    

Example: aperiam

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: fugit

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 5

id   string     

EPI delivery UUID Example: dolores

employee   string     

Employee UUID Example: molestiae

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/10/epi-deliveries" \
    --header "Authorization: Bearer ab4VPkade1v5hgE686DcfZ3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"9ce3cc0b-8ec1-377a-b35a-17559944229f\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"5d48420f-ed32-4dab-bff1-f0af3f717c71\",
    \"stock_id\": \"00fbbcba-6b8e-35fc-b678-2d40652a47fd\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/10/epi-deliveries"
);

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

let body = {
    "epi_type_id": "9ce3cc0b-8ec1-377a-b35a-17559944229f",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "5d48420f-ed32-4dab-bff1-f0af3f717c71",
    "stock_id": "00fbbcba-6b8e-35fc-b678-2d40652a47fd",
    "confirm_insufficient_stock": true
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer ab4VPkade1v5hgE686DcfZ3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 10

employee   string     

Employee UUID Example: voluptatibus

Body Parameters

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 9ce3cc0b-8ec1-377a-b35a-17559944229f

delivery_date   string     

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

quantity   integer  optional    

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

condition   string     

Condicao. Example: Example Condition

Must be one of:
  • new
  • used
  • reformed
delivered_by_employee_id   string  optional    

Responsável pela entrega. The uuid of an existing record in the employees table. Example: 5d48420f-ed32-4dab-bff1-f0af3f717c71

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: 00fbbcba-6b8e-35fc-b678-2d40652a47fd

confirm_insufficient_stock   boolean  optional    

Confirmar saldo insuficiente. Example: true

Create employee initial EPI kit

requires authentication employee-epi kit

Register multiple EPI deliveries as initial kit

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/quia/epi-deliveries/kit" \
    --header "Authorization: Bearer hcav8P5VEbga4fd66Ze3kD1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_date\": \"2024-01-01\",
    \"is_kit_initial\": true,
    \"show_epi_receipt_text\": true,
    \"delivered_by_employee_id\": \"218f6cbe-5a83-464d-8b95-b31db95f2aea\",
    \"stock_id\": \"a304c208-d3b0-33bd-9607-8e9d308784db\",
    \"confirm_insufficient_stock\": true,
    \"items\": [
        {
            \"epi_type_id\": \"c98826f4-821b-3ba2-826f-9acc177b71e1\",
            \"quantity\": 1,
            \"condition\": \"Example Items * condition\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/quia/epi-deliveries/kit"
);

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

let body = {
    "delivery_date": "2024-01-01",
    "is_kit_initial": true,
    "show_epi_receipt_text": true,
    "delivered_by_employee_id": "218f6cbe-5a83-464d-8b95-b31db95f2aea",
    "stock_id": "a304c208-d3b0-33bd-9607-8e9d308784db",
    "confirm_insufficient_stock": true,
    "items": [
        {
            "epi_type_id": "c98826f4-821b-3ba2-826f-9acc177b71e1",
            "quantity": 1,
            "condition": "Example Items * condition"
        },
        null
    ]
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer hcav8P5VEbga4fd66Ze3kD1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: quia

Body Parameters

delivery_date   string     

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

is_kit_initial   boolean  optional    

Kit inicial. Example: true

show_epi_receipt_text   boolean  optional    

Exibir texto do recibo. Example: true

delivered_by_employee_id   string  optional    

Responsável pela entrega. The uuid of an existing record in the employees table. Example: 218f6cbe-5a83-464d-8b95-b31db95f2aea

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: a304c208-d3b0-33bd-9607-8e9d308784db

confirm_insufficient_stock   boolean  optional    

Confirmar saldo insuficiente. Example: true

items   object[]     

Itens do kit. O campo value deve ter pelo menos 1 itens.

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: c98826f4-821b-3ba2-826f-9acc177b71e1

quantity   integer  optional    

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

condition   string     

Condição. Example: Example Items * condition

Must be one of:
  • new
  • used
  • reformed

Promote EPI delivery to kit

requires authentication employee-epi kit

Turn a standalone EPI delivery into a single-item kit so it can generate the acknowledgement term. Idempotent: a delivery already belonging to a kit is returned unchanged.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/deserunt/epi-deliveries/illo/promote-to-kit" \
    --header "Authorization: Bearer beaVv656PDfda4kc13E8Zgh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/deserunt/epi-deliveries/illo/promote-to-kit"
);

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


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

Request      

POST api/employees/{employee}/epi-deliveries/{id}/promote-to-kit

Headers

Authorization        

Example: Bearer beaVv656PDfda4kc13E8Zgh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: deserunt

id   string     

EPI delivery UUID Example: illo

Update employee EPI delivery

requires authentication employee-epi update

Update an EPI delivery for an employee

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employees/3/epi-deliveries/maxime" \
    --header "Authorization: Bearer k8VcEad1Z6a6b3Pf4D5evhg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"b3817f51-273c-3967-aa7c-e983d6d68a61\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"delivered_by_employee_id\": \"82ce2b35-f6e8-43a0-8e53-b52d1ec1ba8d\",
    \"stock_id\": \"ba74efbf-d2f0-315d-878a-ce6a90446550\",
    \"confirm_insufficient_stock\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/3/epi-deliveries/maxime"
);

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

let body = {
    "epi_type_id": "b3817f51-273c-3967-aa7c-e983d6d68a61",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "delivered_by_employee_id": "82ce2b35-f6e8-43a0-8e53-b52d1ec1ba8d",
    "stock_id": "ba74efbf-d2f0-315d-878a-ce6a90446550",
    "confirm_insufficient_stock": true
};

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

Request      

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

Headers

Authorization        

Example: Bearer k8VcEad1Z6a6b3Pf4D5evhg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 3

id   string     

EPI delivery UUID Example: maxime

employee   string     

Employee UUID Example: hic

Body Parameters

epi_type_id   string  optional    

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: b3817f51-273c-3967-aa7c-e983d6d68a61

delivery_date   string  optional    

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

quantity   integer  optional    

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

condition   string  optional    

Condição. Example: Example Condition

Must be one of:
  • new
  • used
  • reformed
delivered_by_employee_id   string  optional    

Responsável pela entrega. The uuid of an existing record in the employees table. Example: 82ce2b35-f6e8-43a0-8e53-b52d1ec1ba8d

stock_id   string  optional    

Estoque. The uuid of an existing record in the stocks table. Example: ba74efbf-d2f0-315d-878a-ce6a90446550

confirm_insufficient_stock   boolean  optional    

Confirmar saldo insuficiente. Example: true

Delete employee EPI delivery

requires authentication employee-epi delete

Delete an EPI delivery from an employee

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/employees/qui/epi-deliveries/voluptatibus" \
    --header "Authorization: Bearer eD6aPfgEhd36bcvkZ14aV85" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/qui/epi-deliveries/voluptatibus"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: qui

id   string     

EPI delivery UUID Example: voluptatibus

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

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

let body = {
    "sort_by": "delivery_date",
    "sort_desc": true,
    "page": 29,
    "per_page": 10,
    "q": "et",
    "employee_id": "voluptatibus",
    "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 aEvab6dk36e4PD15VchgfZ8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 7

employee   string     

Employee UUID Example: quidem

Body Parameters

sort_by   string  optional    

Example: delivery_date

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

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Example: et

employee_id   string  optional    

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

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/labore/epi-terms/6662112d-4534-3ee7-98a8-3dd794cf34cd/upload" \
    --header "Authorization: Bearer v8453haVabPcfeD6Z6gEdk1" \
    --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/labore/epi-terms/6662112d-4534-3ee7-98a8-3dd794cf34cd/upload"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: labore

kitUuid   string     

Kit UUID Example: 6662112d-4534-3ee7-98a8-3dd794cf34cd

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/vel/epi-terms/d083e1c2-8d98-3ab8-9f17-3c38cf280f0d/document" \
    --header "Authorization: Bearer bPdek54v8ahDgc6f6ZVE3a1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/vel/epi-terms/d083e1c2-8d98-3ab8-9f17-3c38cf280f0d/document"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: vel

kitUuid   string     

Kit UUID Example: d083e1c2-8d98-3ab8-9f17-3c38cf280f0d

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/6f8d4b7b-c0c3-3f44-a3b8-58cca3ec2ff6" \
    --header "Authorization: Bearer Da6ev6bEPgVfh14ka8c5Zd3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/6f8d4b7b-c0c3-3f44-a3b8-58cca3ec2ff6"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 6f8d4b7b-c0c3-3f44-a3b8-58cca3ec2ff6

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/0042aefb-17b2-3ca9-8307-5022e1755e8d/info" \
    --header "Authorization: Bearer aDPVavk4Z1edf6Ec658hgb3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/0042aefb-17b2-3ca9-8307-5022e1755e8d/info"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 0042aefb-17b2-3ca9-8307-5022e1755e8d

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/8dd3d3b4-bd49-3101-b202-671559bbd44b/download" \
    --header "Authorization: Bearer Ve6ab5c61D84fvhP3gdaZkE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/8dd3d3b4-bd49-3101-b202-671559bbd44b/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: 8dd3d3b4-bd49-3101-b202-671559bbd44b

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 13ZvEg8e5kd6Dbaa4VPhf6c" \
    --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 13ZvEg8e5kd6Dbaa4VPhf6c",
    "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 13ZvEg8e5kd6Dbaa4VPhf6c

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

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 v6EZgeDh6Pba4c81k3ad5fV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"molestias\",
    \"supplier_id\": \"aut\",
    \"work_id\": \"laudantium\",
    \"start_date\": \"2026-09-01T21:07:33\",
    \"end_date\": \"2110-03-03\",
    \"per_page\": 4
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "q": "molestias",
    "supplier_id": "aut",
    "work_id": "laudantium",
    "start_date": "2026-09-01T21:07:33",
    "end_date": "2110-03-03",
    "per_page": 4
};

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 v6EZgeDh6Pba4c81k3ad5fV

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: molestias

supplier_id   string  optional    

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

work_id   string  optional    

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

start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-09-01T21:07:33

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: 2110-03-03

per_page   integer  optional    

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

Create fiscal document

requires authentication fiscal-documents store

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: deserunt

original_filename   string     

Must match the regex /.xml$/i. Example: .xml$/i

work_ids   string[]  optional    

The uuid of an existing record in the works table.

Get fiscal document

requires authentication fiscal-documents show

Detalha uma nota fiscal com arquivos e obras vinculadas.

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: voluptatibus

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: nostrum

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

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

let body = {
    "file": {
        "path": "maxime",
        "name": "eveniet",
        "extension": "voluptas"
    }
};

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 bk6eaD43PVhgd8cEa615vZf

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: optio

Body Parameters

file   object     
path   string     

Example: maxime

name   string     

Example: eveniet

extension   string     

Example: voluptas

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: dolores

file   string     

UUID do arquivo anexado Example: aperiam

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: consequatur

Body Parameters

work_ids   string[]  optional    

The uuid of an existing record in the works table.

Create installment

requires authentication fiscal-documents update

Lança uma cobrança avulsa na nota fiscal, para o boleto que o fornecedor cobra além das duplicatas do XML. Nasce pendente e sem conta no financeiro; a geração continua sendo pelo import-nfe.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/tenetur/installments" \
    --header "Authorization: Bearer faZD5va4k1EVgPhedb6386c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"due_date\": \"2024-01-01\",
    \"amount\": 1,
    \"number\": \"Example Number\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents/tenetur/installments"
);

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

let body = {
    "due_date": "2024-01-01",
    "amount": 1,
    "number": "Example Number"
};

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

Example response (201):


{
    "data": {
        "id": 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}/installments

Headers

Authorization        

Example: Bearer faZD5va4k1EVgPhedb6386c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: tenetur

Body Parameters

due_date   string     

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

amount   number     

Valor. Example: 1

number   string  optional    

Número da cobrança. O campo value não pode ser superior a 60 caracteres. Example: Example Number

Import

Endpoints for managing NFe imports and product processing.

NFe Imports

Import and process Brazilian electronic invoice (NFe) files.

Create NFe Import

requires authentication imports store

Upload and process a Brazilian NFe (Nota Fiscal Eletrônica) XML file. The file should be uploaded to S3 first, then this endpoint processes it asynchronously.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/imports/nfe/products" \
    --header "Authorization: Bearer Eca1vVk3Zd5P68Deg64habf" \
    --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 Eca1vVk3Zd5P68Deg64habf",
    "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 Eca1vVk3Zd5P68Deg64habf

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: molestiae

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: quia

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: recusandae

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: expedita

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

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

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

let body = {
    "sort_by": "enim",
    "sort_desc": false,
    "page": 67,
    "per_page": 16
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "enim odit",
            "abbreviation": "ZW"
        },
        {
            "id": null,
            "name": "voluptatem nobis",
            "abbreviation": "CP"
        }
    ],
    "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 16EkVgD63P8chv5aZa4fbde

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: enim

sort_desc   boolean  optional    

Example: false

page   integer  optional    

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

per_page   integer  optional    

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "Kallieshire"
        },
        {
            "id": null,
            "name": "Freedachester"
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer v4hc5ZgPD366aEfeV81kdba

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

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

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

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

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "bfd35343-77e6-326d-b175-544a0db95f36",
            "receipt_number": "REC-5668",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Rita Dickinson",
                "document": "478.333.225-16"
            },
            "payment": {
                "amount": 1869.69,
                "amount_in_words": "Valor por extenso de teste",
                "method": "check",
                "description": "Natus magnam a optio."
            },
            "issuer": {
                "name": "Feeney, Kuphal and Cormier",
                "document": "51.074.764/6198-65"
            },
            "issue": {
                "date": "2026-08-18",
                "city": "Adrienland",
                "state": "SP"
            },
            "created_by": {
                "id": "a2a5483f-1927-444d-9b44-b3d99510cf88",
                "name": "Noemy Mann"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "02f1752a-c8c5-3b85-bad7-2a3803085332",
            "receipt_number": "REC-5972",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Curt Greenfelder",
                "document": "341.770.985-69"
            },
            "payment": {
                "amount": 7411.33,
                "amount_in_words": "Valor por extenso de teste",
                "method": "check",
                "description": "Minima nesciunt accusamus cumque sunt ipsam et et corporis."
            },
            "issuer": {
                "name": "Schroeder Inc",
                "document": "08.733.313/9649-45"
            },
            "issue": {
                "date": "2026-08-03",
                "city": "Mooretown",
                "state": "GO"
            },
            "created_by": {
                "id": "a2a5483f-1d2a-4310-8a13-1468759af94d",
                "name": "Howell Hansen"
            },
            "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 1dDZ63Ee8PVkc5hafgb64va

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

work_id   string  optional    

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

bank_account_id   string  optional    

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

Export payment receipts to Excel

requires authentication payment-receipt export

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

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel?sort_by=created_at&sort_desc=1&page=1&per_page=15&q=Jo%C3%A3o+Silva&employee_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&receiver_type=employee&start_date=2025-01-01&end_date=2025-12-31&min_amount=100&max_amount=1000&payment_method=PIX&city=S%C3%A3o+Paulo&search=adipisci&document=dignissimos&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer kevDZg5V13Pfaca6b4dh8E6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/excel"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "João Silva",
    "employee_id": "a01edd80-bf3e-40f7-8613-ccb4be5831b3",
    "receiver_type": "employee",
    "start_date": "2025-01-01",
    "end_date": "2025-12-31",
    "min_amount": "100",
    "max_amount": "1000",
    "payment_method": "PIX",
    "city": "São Paulo",
    "search": "adipisci",
    "document": "dignissimos",
    "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 kevDZg5V13Pfaca6b4dh8E6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (202):


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

Example response (422):


{
    "message": "string"
}
 

Request      

GET api/payment-receipts/excel

Headers

Authorization        

Example: Bearer kevDZg5V13Pfaca6b4dh8E6

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

document   string  optional    

Example: dignissimos

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

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

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

let body = {
    "methods": [
        {
            "method": "cash",
            "eligible": true
        }
    ]
};

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

Request      

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

Headers

Authorization        

Example: Bearer gae3kbPDadvE8V6456chfZ1

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

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

Example: true

Show payment receipt

requires authentication payment-receipt show

Show a payment receipt

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer 5ZefacVDh46b6v8E3dkPg1a" \
    --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 5ZefacVDh46b6v8E3dkPg1a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": {
        "id": "c3069482-3261-3927-879b-d952fcada67f",
        "receipt_number": "REC-5171",
        "receiver_type": "employee",
        "receiver": {
            "id": null,
            "name": "Aron Beier",
            "document": "576.977.133-45"
        },
        "payment": {
            "amount": 8215.37,
            "amount_in_words": "Valor por extenso de teste",
            "method": "cash",
            "description": "Vero aliquam ut provident nesciunt."
        },
        "issuer": {
            "name": "Kerluke-Brakus",
            "document": "87.222.522/3547-83"
        },
        "issue": {
            "date": "2026-08-25",
            "city": "Yundtmouth",
            "state": "MG"
        },
        "created_by": {
            "id": "a2a5483f-3459-4c3c-9e12-7cdce7acaf31",
            "name": "Noah Fay"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer 5ZefacVDh46b6v8E3dkPg1a

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 k5gev3Z1cfEVDba8d6h46aP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"6e6b7ca5-9030-4cd2-bc60-4bb67d5f2d23\",
    \"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\": \"98544176-10cd-35ed-ba81-9121ace22163\",
    \"bank_account_id\": \"0b306b68-2a03-304d-b3ad-f3928b9d52db\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "6e6b7ca5-9030-4cd2-bc60-4bb67d5f2d23",
    "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": "98544176-10cd-35ed-ba81-9121ace22163",
    "bank_account_id": "0b306b68-2a03-304d-b3ad-f3928b9d52db"
};

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 k5gev3Z1cfEVDba8d6h46aP

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: 6e6b7ca5-9030-4cd2-bc60-4bb67d5f2d23

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: 98544176-10cd-35ed-ba81-9121ace22163

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: 0b306b68-2a03-304d-b3ad-f3928b9d52db

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 g8dkDP6ec14v6ZEafa5bV3h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"e533f723-1701-4763-b618-2b7ec5a684ed\",
    \"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\": \"9898536c-0988-3308-9d1f-26e5341658d5\",
    \"bank_account_id\": \"9a510692-5b8d-3cc0-b0d4-9098a1a285d4\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "e533f723-1701-4763-b618-2b7ec5a684ed",
    "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": "9898536c-0988-3308-9d1f-26e5341658d5",
    "bank_account_id": "9a510692-5b8d-3cc0-b0d4-9098a1a285d4"
};

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 g8dkDP6ec14v6ZEafa5bV3h

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: e533f723-1701-4763-b618-2b7ec5a684ed

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: 9898536c-0988-3308-9d1f-26e5341658d5

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: 9a510692-5b8d-3cc0-b0d4-9098a1a285d4

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "9bbe8c8c-b86a-3ae7-a696-f5415336b9f8",
            "receipt_number": "REC-9396",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Annabell Ryan",
                "document": "750.883.728-83"
            },
            "payment": {
                "amount": 5696.62,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Tempora enim voluptates suscipit cumque cumque dolore."
            },
            "issuer": {
                "name": "Bruen-Borer",
                "document": "70.089.791/0535-71"
            },
            "issue": {
                "date": "2026-08-27",
                "city": "Lake Kendrickstad",
                "state": "SP"
            },
            "created_by": {
                "id": "a2a5483f-6261-4b50-974d-f0df97431530",
                "name": "Terrill Beatty"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "dcc7508a-f602-3271-bc14-9da782fcd244",
            "receipt_number": "REC-6926",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Dr. Jermey Bayer",
                "document": "746.358.770-55"
            },
            "payment": {
                "amount": 4866.65,
                "amount_in_words": "Valor por extenso de teste",
                "method": "bank_transfer",
                "description": "Minus est reiciendis aut quas."
            },
            "issuer": {
                "name": "Armstrong-Rosenbaum",
                "document": "36.292.857/9486-44"
            },
            "issue": {
                "date": "2026-08-11",
                "city": "Port Iva",
                "state": "RJ"
            },
            "created_by": {
                "id": "a2a5483f-64d1-42a2-a6d1-f8db8f5c786b",
                "name": "Arthur VonRueden"
            },
            "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 5k6ZDg81aEdfP3ae6c4bvVh

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 16

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


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

Example response (200):


{
    "data": [
        {
            "id": "36da0bd7-51b5-3129-9549-eae5af8c53a8",
            "name": "tempora",
            "display_name": "Minus omnis et inventore dolor eligendi accusantium adipisci."
        },
        {
            "id": "cce6bc74-2b58-3c07-a7b1-1541d5b220aa",
            "name": "aliquid",
            "display_name": "Temporibus delectus ad ratione vero."
        }
    ],
    "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 5eEh1kPc3aaZb84gfvD66dV

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


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

Example response (200):


{
    "data": [
        {
            "id": "bac623cc-5e68-33ef-aedb-ed4d305f95dc",
            "name": "illum-est",
            "display_name": "fuga quae dignissimos",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ad171a60-36d4-3dad-8efd-848eb718c2a2",
            "name": "corporis-ipsam-totam",
            "display_name": "sint amet omnis",
            "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 5dZfaekcPgVba3vEDh16864

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

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

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


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

Example response (200):


{
    "data": {
        "id": "39a95668-6a77-3c21-9cb5-6bc5d9faa236",
        "name": "enim-sint",
        "display_name": "sunt nesciunt iusto",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer b65D48eEPgV1dahcaf3Zv6k

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

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 5DPcvZa3hgE64Vkb16ea8df" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"e545c9f2-ce4a-3552-aee4-dfd5c0153e15\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "e545c9f2-ce4a-3552-aee4-dfd5c0153e15"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "f74fef44-a037-303f-9de6-6c4588f181e8",
        "name": "error-repellat",
        "display_name": "et ducimus id",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 5DPcvZa3hgE64Vkb16ea8df

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 PDkfd1ZEc6ag86V5hvab4e3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"f4c9fda6-0d1a-3cfb-8b40-022aaf590b3c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "f4c9fda6-0d1a-3cfb-8b40-022aaf590b3c"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "5567087e-9fe9-3e42-ab56-9c1550580eca",
        "name": "voluptatibus-laboriosam",
        "display_name": "ab iste et",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer PDkfd1ZEc6ag86V5hvab4e3

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


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

Example response (200):


{
    "data": [
        {
            "id": "09a4f5bf-4ccb-357d-9e2d-279af0cbc009",
            "name": "Dr. Enzo Leal Filho",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "941bc91e-f80d-335c-9890-4da63e4b5157",
            "name": "William Luis Batista 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 6cEh6eZagk1fb85vDVP3ad4

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

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


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

Example response (200):


{
    "data": {
        "id": "d7c01d26-d8ec-3a3d-b653-9ab434a55f23",
        "name": "Eva Maiara Arruda Jr.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer afPhZ4Eev8dD36k6Vbga15c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: sunt

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: quasi

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: quibusdam

Product Families

Endpoints for product families

List product families

requires authentication product-family index

List all product families

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "733b7a93-5726-3b8e-a76c-d381c6564250",
            "name": "Regina Talita Maldonado Jr.",
            "is_epi": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "faa09e99-a783-3711-b9de-fe180965f27f",
            "name": "Sr. Marco Rocha Filho",
            "is_epi": false,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-families

Headers

Authorization        

Example: Bearer PDcgh1f68vdE3Z64bek5Vaa

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

is_epi   boolean  optional    

Example: false

q   string  optional    

Example: Structure

Show product family

requires authentication product-family show

Show a product family

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

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


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

Example response (200):


{
    "data": {
        "id": "ca36d888-061c-378d-b7e5-ce308f016abe",
        "name": "Erik Arthur Amaral",
        "is_epi": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer Ee1h4Pd366bagk8afcvVD5Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: et

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

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

let body = {
    "name": "Example Name",
    "is_epi": true
};

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

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/product-families

Headers

Authorization        

Example: Bearer 6aPg84eVZh1fabdkv5D3c6E

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

is_epi   boolean  optional    

É família de EPI. Example: true

Update product family

requires authentication product-family update

Update a product family

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/product-families/tempora" \
    --header "Authorization: Bearer VaE3g8Pvkcfhbd4D66a1Ze5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"is_epi\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-families/tempora"
);

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

let body = {
    "name": "Example Name",
    "is_epi": true
};

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

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer VaE3g8Pvkcfhbd4D66a1Ze5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: tempora

Body Parameters

name   string     

Nome. Example: Example Name

is_epi   boolean  optional    

É família de EPI. Example: true

Delete product family

requires authentication product-family delete

Delete a product family

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: cum

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 f3Pdk4EeVb5gavh16Z6aD8c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"4faaeec3-35e2-37e5-ba9d-856cbd3a7bcd\",
    \"user_id\": \"549d74e7-1893-3045-a7b6-cf378ec01a7e\",
    \"responsible_id\": \"b5ed3880-becf-3f09-bd09-e80d8e82be15\",
    \"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 f3Pdk4EeVb5gavh16Z6aD8c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "4faaeec3-35e2-37e5-ba9d-856cbd3a7bcd",
    "user_id": "549d74e7-1893-3045-a7b6-cf378ec01a7e",
    "responsible_id": "b5ed3880-becf-3f09-bd09-e80d8e82be15",
    "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": "712d296c-0b21-3db1-8eb2-47845f3dd4fd",
            "name": "Dignissimos accusantium dignissimos laudantium.",
            "description": "Sunt inventore quae explicabo iste consequatur rerum itaque. Accusantium sint labore voluptate totam sed. Laboriosam aut sunt nesciunt velit aliquam aut. Impedit a aut ullam fuga.",
            "work": {
                "id": "a2a54840-101f-4f09-8b71-5062cd7fbdcb",
                "name": "Srta. Fabiana Sanches"
            },
            "user": {
                "id": "a2a54840-1375-4d62-ab2a-6fd099463efa",
                "name": "Mrs. Mia Fritsch"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "29d65e33-0009-3d4e-bdf9-d03ccee57730",
            "name": "Nesciunt voluptatibus est tempora.",
            "description": null,
            "work": {
                "id": "a2a54840-17b0-4f77-852c-3b161ae9c3f3",
                "name": "Carol Betina Vasques Neto"
            },
            "user": {
                "id": "a2a54840-1b04-468f-bbea-33e323a8793f",
                "name": "Maye Tillman DVM"
            },
            "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 f3Pdk4EeVb5gavh16Z6aD8c

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: 4faaeec3-35e2-37e5-ba9d-856cbd3a7bcd

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 549d74e7-1893-3045-a7b6-cf378ec01a7e

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: b5ed3880-becf-3f09-bd09-e80d8e82be15

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

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


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

Example response (200):


{
    "data": {
        "id": "1740d863-b981-3ebe-b0b8-abd2e313b680",
        "name": "Necessitatibus accusantium omnis debitis temporibus.",
        "description": "A aperiam ullam et quia. Voluptatem est non numquam explicabo quis repellendus laudantium. Atque dolore qui pariatur quaerat eveniet cum inventore voluptas. Veritatis qui ducimus non voluptatum similique ut in.",
        "work": {
            "id": "a2a54840-227a-4b66-a115-281cea1553c3",
            "name": "Sr. Luiz Lourenço Flores"
        },
        "user": {
            "id": "a2a54840-24c5-4873-9343-863af6071afc",
            "name": "Ariel Hahn I"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer a6v16akPg4dDEfhc38bZeV5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: enim

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/autem/items" \
    --header "Authorization: Bearer 61D5kc3EadafbVveZ8Ph64g" \
    --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/autem/items"
);

const headers = {
    "Authorization": "Bearer 61D5kc3EadafbVveZ8Ph64g",
    "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": "cde836b8-db0a-30af-9cb7-ed436fbdbbb2",
            "product": {
                "id": "a2a54840-369b-43d9-8f3e-ed2794389e6e",
                "name": "Christian Valência Rosa Jr.",
                "code": "PRD-439772",
                "unit": {
                    "id": "a2a54840-34b3-42e9-9377-52ad641ffd60",
                    "name": "Hosana Paulina Marés",
                    "abbreviation": "Sra. Maraisa da Cruz Sobrinho"
                }
            },
            "quantity": 118.5986,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d9ae44b1-1ab6-388c-8163-3bb07b30b76b",
            "product": {
                "id": "a2a54840-434d-4903-82ed-de76226dd155",
                "name": "Srta. Mônica Uchoa",
                "code": "PRD-252629",
                "unit": {
                    "id": "a2a54840-4256-4bd6-9e77-aac36c24da1e",
                    "name": "Joyce Salgado Bezerra",
                    "abbreviation": "Dr. Luara Beatriz Molina"
                }
            },
            "quantity": 794.5296,
            "observation": "Dicta iure dolorum modi quasi deleniti odit fuga.",
            "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 61D5kc3EadafbVveZ8Ph64g

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: autem

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 6hkE1Da8av6Pdb4Z3fge5Vc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"a47907a4-08e8-3c4b-8bb6-2ea335e30009\",
    \"items\": [
        {
            \"product_id\": \"1f169b4f-e917-36f1-aa5a-967209032550\",
            \"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 6hkE1Da8av6Pdb4Z3fge5Vc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "a47907a4-08e8-3c4b-8bb6-2ea335e30009",
    "items": [
        {
            "product_id": "1f169b4f-e917-36f1-aa5a-967209032550",
            "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 6hkE1Da8av6Pdb4Z3fge5Vc

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: a47907a4-08e8-3c4b-8bb6-2ea335e30009

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 1f169b4f-e917-36f1-aa5a-967209032550

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/illo" \
    --header "Authorization: Bearer hcaZ4egk561v6VE38aDbdfP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"23ed409d-31a5-3d2d-b115-7ca895260e8e\",
            \"product_id\": \"a4815868-8e94-3a28-a46e-14223eb50009\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/illo"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "23ed409d-31a5-3d2d-b115-7ca895260e8e",
            "product_id": "a4815868-8e94-3a28-a46e-14223eb50009",
            "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 hcaZ4egk561v6VE38aDbdfP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: illo

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: 23ed409d-31a5-3d2d-b115-7ca895260e8e

product_id   string     

Produto. The uuid of an existing record in the products table. Example: a4815868-8e94-3a28-a46e-14223eb50009

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: est

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/est/items" \
    --header "Authorization: Bearer 84ZPbd1vVgEkDaa3ef65hc6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"51aedc93-3bdd-35fb-8606-d6eaacc9ccb1\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/est/items"
);

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

let body = {
    "items": [
        {
            "product_id": "51aedc93-3bdd-35fb-8606-d6eaacc9ccb1",
            "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 84ZPbd1vVgEkDaa3ef65hc6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: est

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: 51aedc93-3bdd-35fb-8606-d6eaacc9ccb1

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: molestiae

item   string     

Product Quantity List Item UUID Example: rerum

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/animi/items" \
    --header "Authorization: Bearer f5kcda6bVhaP1ge8Z64Ev3D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"a6d4d854-3231-33fc-a405-5ba3e664acf0\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/animi/items"
);

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

let body = {
    "items": [
        "a6d4d854-3231-33fc-a405-5ba3e664acf0"
    ]
};

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 f5kcda6bVhaP1ge8Z64Ev3D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: animi

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/rerum/sync-items" \
    --header "Authorization: Bearer 4EDhbdge65VZ6akfc81vPa3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"1352d77e-ef38-307d-8f40-1560cb84f008\",
            \"product_id\": \"e65e4fcf-db2c-37c0-b572-25d87885080f\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/rerum/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "1352d77e-ef38-307d-8f40-1560cb84f008",
            "product_id": "e65e4fcf-db2c-37c0-b572-25d87885080f",
            "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 4EDhbdge65VZ6akfc81vPa3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: rerum

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: 1352d77e-ef38-307d-8f40-1560cb84f008

product_id   string     

Produto. The uuid of an existing record in the products table. Example: e65e4fcf-db2c-37c0-b572-25d87885080f

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/distinctio/fulfill" \
    --header "Authorization: Bearer da5kf6eDvhEcg14ZP6V3b8a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"63b7724f-c3eb-32d8-ac96-f9f3106abfbd\",
    \"quantity\": 1,
    \"source_stock_id\": \"bc981c8c-632a-35f7-9ba5-5aa60a937897\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"ccc3a8bc-5104-3f45-bb60-b7194a0dada6\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/distinctio/fulfill"
);

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

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "63b7724f-c3eb-32d8-ac96-f9f3106abfbd",
    "quantity": 1,
    "source_stock_id": "bc981c8c-632a-35f7-9ba5-5aa60a937897",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "ccc3a8bc-5104-3f45-bb60-b7194a0dada6",
            "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 da5kf6eDvhEcg14ZP6V3b8a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: distinctio

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: 63b7724f-c3eb-32d8-ac96-f9f3106abfbd

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: bc981c8c-632a-35f7-9ba5-5aa60a937897

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: ccc3a8bc-5104-3f45-bb60-b7194a0dada6

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

const headers = {
    "Authorization": "Bearer da461Zbv85VehP6kfaDEcg3",
    "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": "e4f9477a-e117-388c-9363-eeb80884e286",
            "quantity": 56.0771,
            "fulfilled_at": "2026-09-01T22:05:38.000000Z",
            "created_at": null
        },
        {
            "id": "a94a3bbd-1de8-352d-a9f8-880ea2afbdb4",
            "quantity": 67.8584,
            "fulfilled_at": "2026-08-04T20:39:56.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 da461Zbv85VehP6kfaDEcg3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: atque

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

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


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

Example response (200):


{
    "data": {
        "id": "9c92f318-5130-3fb2-9522-72e881c94aa1",
        "product": {
            "id": "a2a54844-9c92-4b3a-9995-f0672d6ace7c",
            "name": "Ícaro Pena Mendes Sobrinho",
            "code": "PRD-732311",
            "unit": {
                "id": "a2a54844-9b4e-42d9-891f-c972b82189e3",
                "name": "Dr. Bella Salgado Padilha",
                "abbreviation": "Alan William Ortega"
            }
        },
        "quantity": 949.4099,
        "quantity_fulfilled": 0,
        "quantity_pending": 949.4099,
        "is_fulfilled": false,
        "is_partially_fulfilled": false,
        "observation": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer Dv1fce4b3P5a6k6ghdaV8ZE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: laudantium

item   string     

Product Request Item UUID Example: qui

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

const headers = {
    "Authorization": "Bearer P356gZba8vahdfc1EV6e4Dk",
    "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": "ddc71cce-6f6c-32d5-a6d1-a138eac16f93",
            "product": {
                "id": "a2a54844-b31c-49c7-a94b-ce9d2e19fe4a",
                "name": "Srta. Ingrid Nathalia Godói Filho",
                "code": "PRD-909489",
                "unit": {
                    "id": "a2a54844-b1c6-4e05-8506-0f9971926af2",
                    "name": "Hugo Valente Estrada",
                    "abbreviation": "Jefferson Mascarenhas Carrara"
                }
            },
            "quantity": 884.3004,
            "quantity_fulfilled": 0,
            "quantity_pending": 884.3004,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "671ceb41-14f8-39e1-92dc-9d6b3423aa18",
            "product": {
                "id": "a2a54844-c44e-44af-90a9-e9eaeee8b894",
                "name": "Paulo Batista Aranda",
                "code": "PRD-609434",
                "unit": {
                    "id": "a2a54844-c32b-443a-856e-39d23e0236b8",
                    "name": "Dr. Ziraldo Corona Alcantara",
                    "abbreviation": "Guilherme de Arruda Beltrão Sobrinho"
                }
            },
            "quantity": 247.5173,
            "quantity_fulfilled": 0,
            "quantity_pending": 247.5173,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Eius exercitationem vero aut.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&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 P356gZba8vahdfc1EV6e4Dk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: facilis

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "7735ae39-bb7d-32cd-93f9-e5fc5f4bcab9",
            "product": {
                "id": "a2a54844-e077-485e-a876-105730cf6137",
                "name": "Dr. Noemi Guerra Rios Filho",
                "code": "PRD-799792",
                "unit": {
                    "id": "a2a54844-df01-46e1-9739-4c2d06caf6ca",
                    "name": "Leo Beltrão Santana",
                    "abbreviation": "Benjamin Augusto Verdugo Sobrinho"
                }
            },
            "quantity": 197.0941,
            "quantity_fulfilled": 0,
            "quantity_pending": 197.0941,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Placeat quia distinctio similique in.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6276bfd6-decf-3c88-bedb-fa649437ad5a",
            "product": {
                "id": "a2a54844-f331-4c1e-ad5d-f82dd867fbf3",
                "name": "Dr. Arthur Gomes Ramos",
                "code": "PRD-265000",
                "unit": {
                    "id": "a2a54844-f1da-4b63-85fd-580417f7c979",
                    "name": "Dr. Wesley Otávio Pena Sobrinho",
                    "abbreviation": "Yuri Antônio Matias Filho"
                }
            },
            "quantity": 667.4747,
            "quantity_fulfilled": 0,
            "quantity_pending": 667.4747,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Enim sed unde fuga et.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer ZhE6eb3DgfkP6c4v85daa1V

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: ad

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 48hv3k6dfV1P6Dac5gabEZe" \
    --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\": \"c2d8e4fd-c296-3258-9d88-fd30344e8aec\",
    \"work_location_id\": \"ce389f92-5034-3214-a2e5-31dd19e23785\",
    \"user_id\": \"6a3178b3-5af7-360b-9f1a-4e1b0acec1b4\",
    \"status_id\": \"7dcf5559-874f-3f20-a7fa-a687b515f19c\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"1e186d9d-0c07-34c7-b5c9-2b57fe5e23ee\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer 48hv3k6dfV1P6Dac5gabEZe",
    "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": "c2d8e4fd-c296-3258-9d88-fd30344e8aec",
    "work_location_id": "ce389f92-5034-3214-a2e5-31dd19e23785",
    "user_id": "6a3178b3-5af7-360b-9f1a-4e1b0acec1b4",
    "status_id": "7dcf5559-874f-3f20-a7fa-a687b515f19c",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "1e186d9d-0c07-34c7-b5c9-2b57fe5e23ee"
};

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

Example response (200):


{
    "data": [
        {
            "id": "3a1a78c6-a045-3328-8039-dfb6f0598271",
            "code": null,
            "name": "Maxime quidem cum.",
            "description": null,
            "work": {
                "id": "a2a54841-ac2d-474e-81ef-71b710b84db2",
                "name": "Camila Tamoio da Cruz Neto"
            },
            "user": {
                "id": "a2a54841-af65-4e91-9454-e400fe2fe122",
                "name": "Gerard Schmidt"
            },
            "status": {
                "id": "a2a54841-b152-4a26-81eb-7a5afba61cbb",
                "slug": null,
                "name": null,
                "description": "Dr. Naomi Paes",
                "abbreviation": "quibusdam",
                "color": "#d42ca2",
                "text_color": "#0c3454"
            },
            "priority": "high",
            "priority_label": "Alta",
            "needed_at": null,
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "76bc2d0e-60f8-3d06-8820-03d1a0fb581f",
            "code": null,
            "name": "Magni et corrupti quia.",
            "description": "Tempore quaerat voluptatem veniam laborum. Officia est perspiciatis magni libero harum. Qui ea excepturi a sit saepe id voluptatibus.",
            "work": {
                "id": "a2a54841-b630-45f1-9730-5e4fce864e18",
                "name": "Srta. Cíntia Daiane Cordeiro"
            },
            "user": {
                "id": "a2a54841-b97c-4999-98c3-99b05b168442",
                "name": "Suzanne Lebsack"
            },
            "status": {
                "id": "a2a54841-bb6b-4a31-9ad0-6599cb0da504",
                "slug": null,
                "name": null,
                "description": "Bella Eunice Aguiar Sobrinho",
                "abbreviation": "ullam",
                "color": "#880ad2",
                "text_color": "#6fe762"
            },
            "priority": "medium",
            "priority_label": "Média",
            "needed_at": null,
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests

Headers

Authorization        

Example: Bearer 48hv3k6dfV1P6Dac5gabEZe

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: c2d8e4fd-c296-3258-9d88-fd30344e8aec

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: ce389f92-5034-3214-a2e5-31dd19e23785

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 6a3178b3-5af7-360b-9f1a-4e1b0acec1b4

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 7dcf5559-874f-3f20-a7fa-a687b515f19c

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: 1e186d9d-0c07-34c7-b5c9-2b57fe5e23ee

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

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


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

Example response (200):


{
    "data": {
        "id": "1736bc5b-4367-3698-92aa-9ce803a38459",
        "code": null,
        "name": "Eligendi dolore quas.",
        "description": "Aliquid vel quod voluptas voluptatem dolorum consequatur. Sequi necessitatibus culpa optio est recusandae accusamus enim. Totam asperiores qui deserunt quis sed hic.",
        "work": {
            "id": "a2a54841-c4fa-47f4-b733-6b9ccf94d157",
            "name": "Rodolfo Samuel Barros Jr."
        },
        "user": {
            "id": "a2a54841-c8ad-47d9-864c-07668349f7c1",
            "name": "Ressie Rath"
        },
        "status": {
            "id": "a2a54841-ca9c-41ce-986e-05577919f544",
            "slug": null,
            "name": null,
            "description": "Dr. Diana Samanta Rocha Sobrinho",
            "abbreviation": "exercitationem",
            "color": "#07f8a8",
            "text_color": "#4ebd19"
        },
        "priority": "medium",
        "priority_label": "Média",
        "needed_at": null,
        "approved_at": null,
        "rejection_reason": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-requests/{productRequest}

Headers

Authorization        

Example: Bearer ad563hcZbEagDvfe1846kPV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: ab

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/deleniti/items" \
    --header "Authorization: Bearer 3hEcde8aV1gDPf6bZakv456" \
    --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/deleniti/items"
);

const headers = {
    "Authorization": "Bearer 3hEcde8aV1gDPf6bZakv456",
    "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": "c0dc946a-c1a7-37aa-b749-c28249a115b8",
            "product": {
                "id": "a2a54841-e74c-4eab-8024-0bbed2d9651c",
                "name": "Karine Oliveira",
                "code": "PRD-957168",
                "unit": {
                    "id": "a2a54841-e60d-467f-8e8a-534159627407",
                    "name": "Dr. Aline Thalia Lira Filho",
                    "abbreviation": "Cristóvão Neves Jr."
                }
            },
            "quantity": 393.0214,
            "quantity_fulfilled": 0,
            "quantity_pending": 393.0214,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d4a86fe7-6236-3d03-a0c0-be23d6b67556",
            "product": {
                "id": "a2a54841-f7ca-488f-b177-0931507fd9c5",
                "name": "Mayara Ketlin Cordeiro Filho",
                "code": "PRD-524349",
                "unit": {
                    "id": "a2a54841-f6bc-4e52-9abf-3d5cf1cc3dff",
                    "name": "Sr. Horácio Carmona Dominato",
                    "abbreviation": "Srta. Jaqueline Ingrid Torres Neto"
                }
            },
            "quantity": 563.2786,
            "quantity_fulfilled": 0,
            "quantity_pending": 563.2786,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Et qui aliquam sit porro et labore.",
            "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 3hEcde8aV1gDPf6bZakv456

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: deleniti

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 4VahcE3bgPe8dZ5kDv1f6a6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"3fe51522-564e-360c-8bd6-b81763070e50\",
    \"work_location_id\": \"bdab5c70-0202-3d30-a8f9-4ed46aa573d7\",
    \"status_id\": \"d1f69472-e15c-338e-a67e-fb1b0f0b5238\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"057b9369-d831-35c5-bd9a-d17a3be06705\",
            \"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 4VahcE3bgPe8dZ5kDv1f6a6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "3fe51522-564e-360c-8bd6-b81763070e50",
    "work_location_id": "bdab5c70-0202-3d30-a8f9-4ed46aa573d7",
    "status_id": "d1f69472-e15c-338e-a67e-fb1b0f0b5238",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "057b9369-d831-35c5-bd9a-d17a3be06705",
            "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 4VahcE3bgPe8dZ5kDv1f6a6

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: 3fe51522-564e-360c-8bd6-b81763070e50

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: bdab5c70-0202-3d30-a8f9-4ed46aa573d7

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: d1f69472-e15c-338e-a67e-fb1b0f0b5238

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: 057b9369-d831-35c5-bd9a-d17a3be06705

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/omnis" \
    --header "Authorization: Bearer fcdh18DZ65eEVg3bvP46aka" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"062f815c-1ebb-3ec0-8d35-4a8e8752c65b\",
    \"work_location_id\": \"8d509856-0931-3622-8fde-ff2e43f54321\",
    \"status_id\": \"11368857-698c-3f26-b377-d04c5b85dd26\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"384c9163-adb8-3b47-abae-04192f0003d4\",
            \"product_id\": \"922c40c1-f66f-3032-ba9c-82d52f442932\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/omnis"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "062f815c-1ebb-3ec0-8d35-4a8e8752c65b",
    "work_location_id": "8d509856-0931-3622-8fde-ff2e43f54321",
    "status_id": "11368857-698c-3f26-b377-d04c5b85dd26",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "384c9163-adb8-3b47-abae-04192f0003d4",
            "product_id": "922c40c1-f66f-3032-ba9c-82d52f442932",
            "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 fcdh18DZ65eEVg3bvP46aka

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: omnis

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: 062f815c-1ebb-3ec0-8d35-4a8e8752c65b

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 8d509856-0931-3622-8fde-ff2e43f54321

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 11368857-698c-3f26-b377-d04c5b85dd26

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: 384c9163-adb8-3b47-abae-04192f0003d4

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 922c40c1-f66f-3032-ba9c-82d52f442932

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: officia

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: debitis

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/est/items" \
    --header "Authorization: Bearer 34PfkvegV6b1DaEa8dhZ6c5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"02083d4e-9e82-3364-b4c8-3a7d0940c498\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/est/items"
);

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

let body = {
    "items": [
        {
            "product_id": "02083d4e-9e82-3364-b4c8-3a7d0940c498",
            "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 34PfkvegV6b1DaEa8dhZ6c5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: est

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: 02083d4e-9e82-3364-b4c8-3a7d0940c498

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/in" \
    --header "Authorization: Bearer E13D6dafc5V68b4gvZheakP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"e72e8383-91db-387a-995d-aee7ef55ea94\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/in"
);

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

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "e72e8383-91db-387a-995d-aee7ef55ea94"
};

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 E13D6dafc5V68b4gvZheakP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: in

item   string     

Product Request Item UUID Example: optio

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: e72e8383-91db-387a-995d-aee7ef55ea94

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/molestiae/items" \
    --header "Authorization: Bearer D31ZafdV4baghekv6E856Pc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"e84d4127-d3d6-3018-afab-31d1666f0ccf\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/molestiae/items"
);

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

let body = {
    "items": [
        "e84d4127-d3d6-3018-afab-31d1666f0ccf"
    ]
};

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 D31ZafdV4baghekv6E856Pc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: molestiae

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/sapiente/sync-items" \
    --header "Authorization: Bearer baDcPg6ha4d6V8v1eEZf35k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"324e043f-2aed-3ac7-9c13-07dc1bb3af49\",
            \"product_id\": \"6158ec8e-2f01-30f3-a6e7-8f3a95185198\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/sapiente/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "324e043f-2aed-3ac7-9c13-07dc1bb3af49",
            "product_id": "6158ec8e-2f01-30f3-a6e7-8f3a95185198",
            "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 baDcPg6ha4d6V8v1eEZf35k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: sapiente

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: 324e043f-2aed-3ac7-9c13-07dc1bb3af49

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 6158ec8e-2f01-30f3-a6e7-8f3a95185198

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


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

Example response (200):


{
    "data": [
        {
            "id": "13380d61-45e1-3978-bfef-feddddbd23c7",
            "name": "Srta. Manuela Rangel",
            "code": "PRD-179425",
            "stock": 0,
            "product_family": {
                "id": "a2a5483f-99a5-4306-ab3d-7b83d6fad1ce",
                "name": "Sra. Sheila Romero"
            },
            "product_brand": {
                "id": "a2a5483f-9c69-4384-b5f9-4a511962e7b1",
                "name": "Sr. Christopher Leon"
            },
            "unit": {
                "id": "a2a5483f-9ebc-4046-afca-97b2605167fa",
                "name": "Gian Duarte Rangel",
                "abbreviation": "Dr. Laura Pena Marés"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "In quae inventore similique sed velit corrupti labore.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "00f49585-86e8-3fd6-87ec-7c67d81062cf",
            "name": "Dr. Gael Vasques",
            "code": "PRD-111710",
            "stock": 977962993,
            "product_family": {
                "id": "a2a5483f-a30a-4ac7-ac4f-b38ee31c3b32",
                "name": "Srta. Ariane Campos Jr."
            },
            "product_brand": {
                "id": "a2a5483f-a4fe-4008-b538-9b3ebc84aed9",
                "name": "Malu Ramos"
            },
            "unit": {
                "id": "a2a5483f-a6ee-4798-a236-4f779a0566b1",
                "name": "Dr. Tatiane Andréia Correia",
                "abbreviation": "Luiza Romero Ortiz"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Totam officiis necessitatibus fugit delectus consequuntur delectus in.",
            "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 5e6k1c4daaVZbfEvg368PDh

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


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

Example response (200):


{
    "data": {
        "id": "58ca0b7c-b526-3922-a60d-b551c584c4d0",
        "name": "Rafael Salazar",
        "code": "PRD-849525",
        "stock": 9,
        "product_family": {
            "id": "a2a5483f-b07a-41a4-956a-9c67a4cc10f1",
            "name": "Dr. Alessandro Bruno Verdugo Sobrinho"
        },
        "product_brand": {
            "id": "a2a5483f-b288-467f-8786-6d4cbb936201",
            "name": "Lidiane Camila Soares Filho"
        },
        "unit": {
            "id": "a2a5483f-b488-45ff-96c5-bd30db451fd3",
            "name": "Josefina Rios",
            "abbreviation": "Dr. Elaine Dayana Alves"
        },
        "image": {
            "id": null,
            "url": null
        },
        "description": "Omnis ut et molestiae laboriosam nobis laborum.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer 6DEd46kPfa8cea5V3Zg1hvb

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

List available origins

requires authentication product show

List supplier_products (NF items) with available quantity for the given product, ordered FIFO by NF date.

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: et

Create product

requires authentication product store

Create a new product

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/products" \
    --header "Authorization: Bearer e1afZ3b46gdckVEvah586PD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"51473184-6330-3855-840f-60bcf5438b7d\",
    \"product_brand_id\": \"b0ed0839-d314-3546-a3b7-8d93fa752a9d\",
    \"unit_id\": \"380dfde0-f874-3271-ab32-0f36845fadf3\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "51473184-6330-3855-840f-60bcf5438b7d",
    "product_brand_id": "b0ed0839-d314-3546-a3b7-8d93fa752a9d",
    "unit_id": "380dfde0-f874-3271-ab32-0f36845fadf3",
    "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 e1afZ3b46gdckVEvah586PD

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: 51473184-6330-3855-840f-60bcf5438b7d

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: b0ed0839-d314-3546-a3b7-8d93fa752a9d

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: 380dfde0-f874-3271-ab32-0f36845fadf3

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 gbva6V36kfDcd1aP4Eh58Ze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"ce884ae1-3212-388e-9e02-cd51ea623bd1\",
    \"product_brand_id\": \"61429c21-6f15-3da1-bd57-90b413ed6aff\",
    \"unit_id\": \"97178c97-c816-35a7-87c8-9dda6c29f87f\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "ce884ae1-3212-388e-9e02-cd51ea623bd1",
    "product_brand_id": "61429c21-6f15-3da1-bd57-90b413ed6aff",
    "unit_id": "97178c97-c816-35a7-87c8-9dda6c29f87f",
    "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 gbva6V36kfDcd1aP4Eh58Ze

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

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: ce884ae1-3212-388e-9e02-cd51ea623bd1

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 61429c21-6f15-3da1-bd57-90b413ed6aff

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: 97178c97-c816-35a7-87c8-9dda6c29f87f

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: totam

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/3bba8a27-ea61-3575-90f3-a5559ddda23c/versions" \
    --header "Authorization: Bearer 18bkvfZdP64ahE3ac65egDV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"Example Notes\",
    \"responsible_user_id\": \"c4d05ae1-704f-3374-89f2-60b982e40adc\",
    \"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/3bba8a27-ea61-3575-90f3-a5559ddda23c/versions"
);

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

let body = {
    "notes": "Example Notes",
    "responsible_user_id": "c4d05ae1-704f-3374-89f2-60b982e40adc",
    "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 18bkvfZdP64ahE3ac65egDV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 3bba8a27-ea61-3575-90f3-a5559ddda23c

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: c4d05ae1-704f-3374-89f2-60b982e40adc

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/7f81d94d-c9fb-3c28-9d5e-644b588bee22/versions" \
    --header "Authorization: Bearer f1D3Zgd65vPabkcah8E46Ve" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/7f81d94d-c9fb-3c28-9d5e-644b588bee22/versions"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 7f81d94d-c9fb-3c28-9d5e-644b588bee22

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/3f53525e-e71a-38fe-926a-7cc3727c232e" \
    --header "Authorization: Bearer fdbaEva64kVD8ch1Z3g6e5P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/3f53525e-e71a-38fe-926a-7cc3727c232e"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 3f53525e-e71a-38fe-926a-7cc3727c232e

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/a94221d3-7ea5-308c-9615-7d7fbcaf9453/download" \
    --header "Authorization: Bearer 8E5evab6c3Z4k6PVhagfD1d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/a94221d3-7ea5-308c-9615-7d7fbcaf9453/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: a94221d3-7ea5-308c-9615-7d7fbcaf9453

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/742621eb-c15f-3a38-ba6c-8573a11645ac/restore" \
    --header "Authorization: Bearer 45E8Zgb3DhfPkcV6dae1v6a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/742621eb-c15f-3a38-ba6c-8573a11645ac/restore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 742621eb-c15f-3a38-ba6c-8573a11645ac

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/c594a184-a794-3389-a4e4-a08685f1ec75" \
    --header "Authorization: Bearer D1Vka6vdg56ce3bfEh4a8PZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/c594a184-a794-3389-a4e4-a08685f1ec75"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: c594a184-a794-3389-a4e4-a08685f1ec75

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=f7c390b0-ae22-39e2-9fac-e2e7691caec5&work_id=f3737697-6198-3fa3-a421-e8ff7731cf7c&status_id=fd4eb808-f826-3f96-b681-d713fa76a57a&responsible_id=aff125a4-a96c-3eac-b34b-55c810ec1567" \
    --header "Authorization: Bearer DcbV38vdeakgaPEZf415h66" \
    --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": "f7c390b0-ae22-39e2-9fac-e2e7691caec5",
    "work_id": "f3737697-6198-3fa3-a421-e8ff7731cf7c",
    "status_id": "fd4eb808-f826-3f96-b681-d713fa76a57a",
    "responsible_id": "aff125a4-a96c-3eac-b34b-55c810ec1567",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "0561f96f-225a-3444-80c9-262ba2470763",
            "name": "Qui qui error",
            "description": "Voluptatem eos aliquid voluptate nihil officiis dolor.",
            "current_version": 1,
            "file": {
                "path": "projects/f10f8f8a-995e-3c9d-bd79-fa9c27d00ca5.pdf",
                "size": "3881415",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a2a54844-fd86-4d6b-a677-c40c83686c13",
                "name": "Maxime",
                "code": "CZQ"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0cc3cb41-45bf-3490-9d7a-17e765c37fea",
            "name": "Harum et asperiores",
            "description": "Natus vero sed non delectus quasi mollitia quidem.",
            "current_version": 1,
            "file": {
                "path": "projects/1b35fae3-e72f-3533-a99b-af8cb83f46ed.pdf",
                "size": "4598387",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a2a54845-0159-4029-a45c-b06e6e9d1d32",
                "name": "Delectus",
                "code": "NMR"
            },
            "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 DcbV38vdeakgaPEZf415h66

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: f7c390b0-ae22-39e2-9fac-e2e7691caec5

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: f3737697-6198-3fa3-a421-e8ff7731cf7c

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: fd4eb808-f826-3f96-b681-d713fa76a57a

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: aff125a4-a96c-3eac-b34b-55c810ec1567

Show project

requires authentication project show

Show a project

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

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


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

Example response (200):


{
    "data": {
        "id": "de3df094-5dd6-3a5d-bdb3-2f52ef4dcc46",
        "name": "Et deleniti officia",
        "description": "Vel autem cumque cum aliquam.",
        "current_version": 1,
        "file": {
            "path": "projects/ae588dd7-5bb5-3297-89b4-181400ab0be0.pdf",
            "size": "1571603",
            "extension": "pdf"
        },
        "discipline": {
            "id": "a2a54845-09aa-4303-93d4-2a38a316a39f",
            "name": "Facilis",
            "code": "AGZ"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/projects/{id}

Headers

Authorization        

Example: Bearer 3DZ56Pf8hkV1bdEgc6aave4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 8

project   string     

Project UUID Example: quam

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 Db4Z65haPv8Vfdg3a16ckeE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"ac4099fa-1038-3167-ac01-c0039c00dbbe\",
    \"work_id\": \"a38a0d1b-94b2-33cb-ba37-15007ca37dbb\",
    \"responsible_user_id\": \"e6df468b-f47f-35bb-a824-08f42f8d4a9c\",
    \"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 Db4Z65haPv8Vfdg3a16ckeE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "ac4099fa-1038-3167-ac01-c0039c00dbbe",
    "work_id": "a38a0d1b-94b2-33cb-ba37-15007ca37dbb",
    "responsible_user_id": "e6df468b-f47f-35bb-a824-08f42f8d4a9c",
    "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 Db4Z65haPv8Vfdg3a16ckeE

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: ac4099fa-1038-3167-ac01-c0039c00dbbe

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: a38a0d1b-94b2-33cb-ba37-15007ca37dbb

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: e6df468b-f47f-35bb-a824-08f42f8d4a9c

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 dhDVE3fePkvg581ba6a64cZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"c541e303-6bf5-3461-8c97-14408f54f24c\",
    \"work_id\": \"a2c9051d-f185-37b2-957c-856772d1096d\",
    \"responsible_user_id\": \"2ede4eaf-bdd5-3388-929a-6ffa67b98f5e\",
    \"status_id\": \"7516e07f-6ba1-3ade-99dd-ba9f58f1f3b5\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/14"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "c541e303-6bf5-3461-8c97-14408f54f24c",
    "work_id": "a2c9051d-f185-37b2-957c-856772d1096d",
    "responsible_user_id": "2ede4eaf-bdd5-3388-929a-6ffa67b98f5e",
    "status_id": "7516e07f-6ba1-3ade-99dd-ba9f58f1f3b5"
};

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 dhDVE3fePkvg581ba6a64cZ

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

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: c541e303-6bf5-3461-8c97-14408f54f24c

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: a2c9051d-f185-37b2-957c-856772d1096d

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: 2ede4eaf-bdd5-3388-929a-6ffa67b98f5e

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: 7516e07f-6ba1-3ade-99dd-ba9f58f1f3b5

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project   string     

Project UUID Example: dolore

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 cP6kZ8hE6vae13afV4Dgdb5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_log\": \"qui\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);

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

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

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 cP6kZ8hE6vae13afV4Dgdb5

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

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 aE6bgdaVD46k8e3fhcP1vZ5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"employee\": \"quas\",
    \"kit_uuid\": \"81548586-9b44-3109-9c61-7371232f42e8\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/epi-term"
);

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

let body = {
    "employee": "quas",
    "kit_uuid": "81548586-9b44-3109-9c61-7371232f42e8"
};

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 aE6bgdaVD46k8e3fhcP1vZ5

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

employee   string     

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

kit_uuid   string     

O campo value deve ser um UUID válido. Example: 81548586-9b44-3109-9c61-7371232f42e8

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=et&type=entrada&description=Harum+dolorum+dolores+ratione+aperiam+minus+non+ipsam.&categories[]=0418b996-2566-37e5-bfbf-5dd2dfdd82ad&exclude_categories[]=d3b9afef-c78e-39d1-85ee-5b76dbeefa69&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=94c91a0c-c411-365e-bece-615831d1bccc&customers[]=68237000-8799-32db-8ff7-af07aace9fae&suppliers[]=c33996a1-dc69-3d7a-89e5-876b7401b6e0&cash_session=dc22ed5d-13c4-32fc-bca5-e584902194f6&works[]=59e96c86-261a-3e0c-bb2e-500973f3720b" \
    --header "Authorization: Bearer k48v6caVPb3edEh5f6ZgDa1" \
    --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": "et",
    "type": "entrada",
    "description": "Harum dolorum dolores ratione aperiam minus non ipsam.",
    "categories[0]": "0418b996-2566-37e5-bfbf-5dd2dfdd82ad",
    "exclude_categories[0]": "d3b9afef-c78e-39d1-85ee-5b76dbeefa69",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "94c91a0c-c411-365e-bece-615831d1bccc",
    "customers[0]": "68237000-8799-32db-8ff7-af07aace9fae",
    "suppliers[0]": "c33996a1-dc69-3d7a-89e5-876b7401b6e0",
    "cash_session": "dc22ed5d-13c4-32fc-bca5-e584902194f6",
    "works[0]": "59e96c86-261a-3e0c-bb2e-500973f3720b",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: et

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: Harum dolorum dolores ratione aperiam minus non ipsam.

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: dc22ed5d-13c4-32fc-bca5-e584902194f6

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=non&type=entrada&description=Et+non+architecto+voluptates+est+cupiditate.&categories[]=472c41c0-d7f6-3fbc-ba0b-6ccd7e8e7a87&exclude_categories[]=67cb187f-66a8-39ee-a995-a2e3e36008f4&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=ab184b4e-3fdb-3712-9777-b96079cfb083&customers[]=3be210db-161d-3cc8-81bf-ce3206ee60a9&suppliers[]=b6e37021-bab6-3fa2-a325-2fe98a7b1506&cash_session=c526fa7c-b093-383a-b7fd-d08b83cf04a9&works[]=2e6c812f-5f85-3b55-af47-b1e88930406e" \
    --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": "non",
    "type": "entrada",
    "description": "Et non architecto voluptates est cupiditate.",
    "categories[0]": "472c41c0-d7f6-3fbc-ba0b-6ccd7e8e7a87",
    "exclude_categories[0]": "67cb187f-66a8-39ee-a995-a2e3e36008f4",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "ab184b4e-3fdb-3712-9777-b96079cfb083",
    "customers[0]": "3be210db-161d-3cc8-81bf-ce3206ee60a9",
    "suppliers[0]": "b6e37021-bab6-3fa2-a325-2fe98a7b1506",
    "cash_session": "c526fa7c-b093-383a-b7fd-d08b83cf04a9",
    "works[0]": "2e6c812f-5f85-3b55-af47-b1e88930406e",
};
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: non

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: Et non architecto voluptates est cupiditate.

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: c526fa7c-b093-383a-b7fd-d08b83cf04a9

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "774fb275-5a3b-348f-9621-979f4650565d",
            "name": "ex dicta",
            "slug": null,
            "description": null,
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "85c608b3-5750-3fff-8e17-c4d8c92cc50d",
            "name": "eum alias",
            "slug": null,
            "description": null,
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/sectors

Headers

Authorization        

Example: Bearer ebvckE1aZ3g45PaD686fhVd

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

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

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


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

Example response (200):


{
    "data": {
        "id": "b51ee49b-4f08-318a-a9de-b147fb08899b",
        "name": "dignissimos incidunt",
        "slug": null,
        "description": null,
        "abbreviation": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer DaEb6d43eaZvfP5kgh8V1c6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 13

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 7

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 11

sector   string     

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "6f7d8c2d-159e-3873-b3dc-325f74b826be",
            "name": "Rahul Erdman Jr.",
            "username": "darrel.kiehn",
            "email": "cronin.joanne@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "482c652a-c06e-3d79-8606-6a8fab0da997",
            "name": "Kiarra Howell",
            "username": "satterfield.russ",
            "email": "leonard.aufderhar@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 46akd815fvgD6c3PbZVhaeE

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 bg4D8PeVha6c1ak6f3Ed5Zv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"52ac92b0-210a-3de0-a2a3-7f6d5336d7b2\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "52ac92b0-210a-3de0-a2a3-7f6d5336d7b2"
    ]
};

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 bg4D8PeVha6c1ak6f3Ed5Zv

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 6db1Dh5afkvaVeE68c3gZP4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"7dfe31e6-0aaa-3a77-81d0-b362b47ec3a7\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "7dfe31e6-0aaa-3a77-81d0-b362b47ec3a7"
    ]
};

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

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 c6Z4gdhkEevfa685aV31PbD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"437bf2bb-43e0-3ea5-8a54-d6db9f46cb1c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "437bf2bb-43e0-3ea5-8a54-d6db9f46cb1c"
    ]
};

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 c6Z4gdhkEevfa685aV31PbD

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


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

Example response (200):


{
    "data": [
        {
            "name": "est sequi",
            "slug": "dolore-voluptatem-architecto-ut-quia-voluptas-vel-autem-voluptatem"
        },
        {
            "name": "id quis",
            "slug": "vitae-consequatur-libero-vel-molestiae-iste"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer hg46fk86ZdDcV1v5PEaeab3

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


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

Example response (200):


{
    "data": [
        {
            "id": "f69d8fae-2e7f-3ddc-b56c-1febc2e95af8",
            "slug": null,
            "name": null,
            "description": "Dr. Evandro Emerson Jimenes",
            "abbreviation": "quo",
            "color": "#42e5dc",
            "text_color": "#09910a",
            "module": {
                "name": "Obras",
                "slug": "work"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "94aa1819-673e-3224-a6bc-c8a4941518b3",
            "slug": null,
            "name": null,
            "description": "Dr. Amanda Luísa Solano",
            "abbreviation": "unde",
            "color": "#167144",
            "text_color": "#15ba97",
            "module": {
                "name": "Solicitação de Produtos",
                "slug": "product_request"
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/statuses

Headers

Authorization        

Example: Bearer gdDEaa5vbZ4fecVk616h83P

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 a3651a6kcfZPb4EedvDhgV8" \
    --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\": \"0781606a-2de8-3e0c-a5f0-69717e9d0cd8\",
    \"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 a3651a6kcfZPb4EedvDhgV8",
    "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": "0781606a-2de8-3e0c-a5f0-69717e9d0cd8",
    "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 a3651a6kcfZPb4EedvDhgV8

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: 0781606a-2de8-3e0c-a5f0-69717e9d0cd8

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


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

Example response (200):


{
    "data": {
        "id": "7530a85d-01ce-3129-b950-9c5bebc5feeb",
        "slug": null,
        "name": null,
        "description": "Fabiana Sandoval Saraiva",
        "abbreviation": "ea",
        "color": "#272dfd",
        "text_color": "#aa7e54",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer Zhd6DVv6k3abPg851e4cEaf

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 bceE5ag8hVafZkP46d61v3D" \
    --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\": \"d3154c64-73eb-3e4f-876a-c436fc5a2e45\",
    \"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 bceE5ag8hVafZkP46d61v3D",
    "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": "d3154c64-73eb-3e4f-876a-c436fc5a2e45",
    "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 bceE5ag8hVafZkP46d61v3D

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: d3154c64-73eb-3e4f-876a-c436fc5a2e45

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "700e6e30-0ae9-3378-a710-4e5b70569f1c",
            "quantity": 144.0096,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "413af1b0-5118-3024-9c2c-894ee20efc56",
            "quantity": 467.8195,
            "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 EPdhgk3ef5bcV614av8DZa6

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


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

Example response (200):


{
    "data": [
        {
            "id": "3bc0708c-2f43-3f9e-9cd5-5d48445d20e1",
            "name": "Estoque Bezerra-Saito",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "da517c02-2db0-35fa-87b9-09361254c46a",
            "name": "Estoque Cervantes Comercial 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 b3kefa1D6PavEdh845g6VcZ

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 VZgbv8kd6PceEahf1a4563D" \
    --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 VZgbv8kd6PceEahf1a4563D",
    "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": "40ee5520-ad52-3ef6-9b7c-6e041111c6e2",
        "name": "Estoque das Neves Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer VZgbv8kd6PceEahf1a4563D

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


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

Example response (200):


{
    "data": {
        "id": "4a201719-aa24-3878-add8-3fb50c209846",
        "name": "Estoque Rocha 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 fak648b53a1VhEedPvZ6Dcg

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


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

Example response (200):


{
    "data": {
        "id": "bc0e2a74-6a45-3b68-9ddb-d78f50893420",
        "name": "Estoque Barreto S.A.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer dbf3agvP5a41ehDZ6E8kV6c

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 cdk6bEgvDa6ea315hfP48VZ" \
    --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 cdk6bEgvDa6ea315hfP48VZ",
    "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": "d1d122c8-0000-3650-8092-255b0add3b46",
        "name": "Estoque Domingues S.A.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/stocks/{id}

Headers

Authorization        

Example: Bearer cdk6bEgvDa6ea315hfP48VZ

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "05476550-cae1-3198-81e4-b5025b47c4ec",
            "quantity": 488.5066,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f47334e1-65a9-3db3-97a3-92720b8ed88b",
            "quantity": 751.4694,
            "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 Za1gecfhbk663a8VP4EvdD5

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

const headers = {
    "Authorization": "Bearer v1Pea46kbg3DVha8Zdc6E5f",
    "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": "5a34d1dc-1545-3663-9807-c74554cda1f0",
        "quantity": 31.6829,
        "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 v1Pea46kbg3DVha8Zdc6E5f

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "4e550e2b-9776-3fd5-90e7-fc61b3de1c86",
            "code": "MOV-713647",
            "type": "saída transferência",
            "type_name": "TRANSFER_OUT",
            "is_entry": false,
            "is_exit": true,
            "quantity": 58.9611,
            "previous_quantity": 522.1933,
            "new_quantity": 463.2322,
            "reason": "Illum recusandae blanditiis in quos.",
            "movement_date": "2026-09-01T23:04:22.000000Z",
            "created_at": null
        },
        {
            "id": "fff445fb-d662-3339-905e-f6995990792f",
            "code": "MOV-721577",
            "type": "venda",
            "type_name": "SALE",
            "is_entry": false,
            "is_exit": true,
            "quantity": 67.6768,
            "previous_quantity": 282.7027,
            "new_quantity": 215.0259,
            "reason": null,
            "movement_date": "2026-08-08T16:34:12.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 V51Edac6PfbD6hg3evZa48k

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 kcaeD8fgdb65hvZ4Ea16V3P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"00718cc7-6b2b-354e-bd31-cf2dd1de0fd4\",
    \"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 kcaeD8fgdb65hvZ4Ea16V3P",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "00718cc7-6b2b-354e-bd31-cf2dd1de0fd4",
    "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": "61cbd1bc-efda-3072-a95d-09168215d317",
        "code": "MOV-109361",
        "type": "perda",
        "type_name": "LOSS",
        "is_entry": false,
        "is_exit": true,
        "quantity": 11.1769,
        "previous_quantity": 46.3872,
        "new_quantity": 35.2103,
        "reason": null,
        "movement_date": "2026-08-06T06:12:40.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer kcaeD8fgdb65hvZ4Ea16V3P

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: 00718cc7-6b2b-354e-bd31-cf2dd1de0fd4

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 vVbaeD6khd3c451ga6fP8ZE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"6560a7f2-95c8-3435-9a20-c8b364b7948b\",
    \"destination_stock_id\": \"789b0b10-c379-38d7-be31-3d79388735aa\",
    \"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 vVbaeD6khd3c451ga6fP8ZE",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "6560a7f2-95c8-3435-9a20-c8b364b7948b",
    "destination_stock_id": "789b0b10-c379-38d7-be31-3d79388735aa",
    "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": "5eb64db2-1995-3205-81ed-7a33f8abb343",
        "code": "MOV-423090",
        "type": "venda",
        "type_name": "SALE",
        "is_entry": false,
        "is_exit": true,
        "quantity": 53.9588,
        "previous_quantity": 648.408,
        "new_quantity": 594.4492,
        "reason": "Totam suscipit iusto non.",
        "movement_date": "2026-08-28T14:12:12.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer vVbaeD6khd3c451ga6fP8ZE

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: 6560a7f2-95c8-3435-9a20-c8b364b7948b

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: 789b0b10-c379-38d7-be31-3d79388735aa

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 e5V46ahvfZP6ad18D3Ebcgk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"a669a1da-8466-362f-8f29-c1c58247284f\",
    \"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 e5V46ahvfZP6ad18D3Ebcgk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "a669a1da-8466-362f-8f29-c1c58247284f",
    "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": "f053083d-09a0-3eb8-9cec-0a8f597d55b4",
        "code": "MOV-270751",
        "type": "devolução",
        "type_name": "RETURN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 2.8629,
        "previous_quantity": 291.6312,
        "new_quantity": 294.4941,
        "reason": null,
        "movement_date": "2026-08-25T21:09:29.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/inventory

Headers

Authorization        

Example: Bearer e5V46ahvfZP6ad18D3Ebcgk

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: a669a1da-8466-362f-8f29-c1c58247284f

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 fgd53Ek8hePD41ab6Va6Zvc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"f712ddbb-bc3f-3b53-bfae-7282ce2e7ee1\",
    \"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 fgd53Ek8hePD41ab6Va6Zvc",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "f712ddbb-bc3f-3b53-bfae-7282ce2e7ee1",
    "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": "010de333-1654-3fa5-ac63-d37aabeff2ee",
        "code": "MOV-467913",
        "type": "ajuste saída",
        "type_name": "ADJUSTMENT_OUT",
        "is_entry": false,
        "is_exit": true,
        "quantity": 15.9447,
        "previous_quantity": 279.1514,
        "new_quantity": 263.2067,
        "reason": null,
        "movement_date": "2026-08-05T05:39:08.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stock-movements/purchase

Headers

Authorization        

Example: Bearer fgd53Ek8hePD41ab6Va6Zvc

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: f712ddbb-bc3f-3b53-bfae-7282ce2e7ee1

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


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

Example response (200):


{
    "data": {
        "id": "f751e28d-95ae-3288-b694-ae1e0ba22130",
        "code": "MOV-032302",
        "type": "ajuste saída",
        "type_name": "ADJUSTMENT_OUT",
        "is_entry": false,
        "is_exit": true,
        "quantity": 57.2817,
        "previous_quantity": 172.3319,
        "new_quantity": 115.0502,
        "reason": null,
        "movement_date": "2026-08-26T20:13:28.000000Z",
        "created_at": null
    }
}
 

Request      

GET api/stock-movements/{movement}

Headers

Authorization        

Example: Bearer da6vDkPecEhf8435bZa61Vg

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


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

Example response (200):


{
    "data": [
        {
            "id": "5c70ec42-4c0f-389b-9d16-f575772aff50",
            "name": "Srta. Michele Teles Galvão Neto",
            "email": "eunice77@example.org",
            "phone": "(18) 4861-7690",
            "document": "47.842.879/0001-82",
            "type": "pj",
            "responsible": "Jennifer de Oliveira Rocha Neto",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "a53d01c9-df87-33f3-bd66-3a920b00d327",
            "name": "Sr. Jefferson Leal Mendonça Neto",
            "email": "smendes@example.net",
            "phone": "(37) 96858-8660",
            "document": "82.074.978/0001-62",
            "type": "pf",
            "responsible": "Martinho Gean Molina Jr.",
            "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 agd5b6aEVcP4e8D6Zfk1h3v

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

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


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

Example response (200):


{
    "data": {
        "id": "1d9f5043-ddfc-332c-b0d2-320efeb65128",
        "name": "Dr. Hortência Aguiar Sobrinho",
        "email": "raguiar@example.net",
        "phone": "(19) 4736-4413",
        "document": "78.204.472/0001-53",
        "type": "pf",
        "responsible": "Rodrigo Cezar Soto",
        "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 Pg466f3hkE1de5bVDZcaa8v

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

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

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 415eD3h6avVkEf6bgadcZP8" \
    --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 415eD3h6avVkEf6bgadcZP8",
    "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 415eD3h6avVkEf6bgadcZP8

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


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

Example response (200):


{
    "data": [
        {
            "id": "0f15be05-aefd-3dbb-9cb8-98b7197452f5",
            "name": "Srta. Giovanna Uchoa Jr.",
            "description": "Dolore dicta excepturi omnis sed necessitatibus. Velit sit culpa reprehenderit nihil voluptas illum adipisci.",
            "type": "saída"
        },
        {
            "id": "be8747a1-d630-30ce-b437-8966f4bb5e0f",
            "name": "Franciele Julieta Solano",
            "description": "Autem placeat est quidem aut. Unde non itaque et fugit qui vel fugit. Cum qui laboriosam vel corporis quis enim. Quo deserunt ducimus facere nisi sunt iusto sed distinctio.",
            "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 gVbh61Ze854ak3afE6DvdcP

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

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


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

Example response (200):


{
    "data": {
        "id": "c197af27-fecb-3810-ab12-8c2bc9726ccb",
        "name": "Miguel da Cruz Gomes",
        "description": "Molestias quae accusamus natus aliquam non. Est qui eum laborum facilis praesentium ipsum eius. Delectus sunt inventore consequatur. Est sapiente culpa asperiores quae sit eum.",
        "type": "pagamento"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer eD66k3Ed1cvaVba8PhZg45f

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: veritatis

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: ut

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: soluta

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


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

Example response (200):


{
    "data": [
        {
            "id": "893dbf26-38ae-38a8-a32b-1ff0566561bd",
            "name": "George Marques Serrano Filho",
            "abbreviation": "Sra. Noemi Teles Sobrinho",
            "description": "Quia dolorum et ut.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e8afff54-24b8-3a56-9810-daee2eeaedec",
            "name": "Dr. Carol Verdara",
            "abbreviation": "Sra. Valentina Gil Carrara",
            "description": "Asperiores sint eius alias.",
            "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 kc41P6h8bg3a5Zfe6avVdED

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


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

Example response (200):


{
    "data": {
        "id": "f5f395a3-1769-3c2e-b0cc-2c9affc6cf5c",
        "name": "Michele Soto Sobrinho",
        "abbreviation": "Sr. Ian Santos Benez",
        "description": "Inventore soluta qui ea.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer ea45PkZvDg1cb6f386dhaVE

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: est

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


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

Example response (200):


{
    "data": [
        {
            "id": "9c306d55-8169-3ef1-bb63-99048d0a2bf2",
            "name": "Maud Boehm III",
            "username": "devon.doyle",
            "email": "idurgan@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "4bc088af-5c37-30a1-8288-fccca204799d",
            "name": "Marvin Kozey IV",
            "username": "alayna74",
            "email": "percival09@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 DaP3deh1Z6fag5V8Ev4kbc6

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


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

Example response (200):


{
    "data": {
        "id": "85591c30-4998-3e44-898f-4774573d9906",
        "name": "Mrs. Gisselle Bradtke III",
        "username": "lazaro.oreilly",
        "email": "yvette89@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 ZEcbv4f13hV5P6adea6kg8D

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 a46E18ZhdVv56akg3cPeDfb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"bdickinson\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"7dcd5e69-e582-3e6e-b326-6caf9357731e\"
    ],
    \"roles\": [
        \"e85721fc-0ac5-3a03-b82b-15083dd02a03\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "bdickinson",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "7dcd5e69-e582-3e6e-b326-6caf9357731e"
    ],
    "roles": [
        "e85721fc-0ac5-3a03-b82b-15083dd02a03"
    ]
};

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 a46E18ZhdVv56akg3cPeDfb

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

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 aPg6cEkaveZ3dV6fh4D58b1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"yoberbrunner\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"f0932b62-3d2a-32ea-9669-53e39b59f8a2\"
    ],
    \"roles\": [
        \"ad3e812f-b846-3ac2-a46b-830893eba8b1\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "yoberbrunner",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "f0932b62-3d2a-32ea-9669-53e39b59f8a2"
    ],
    "roles": [
        "ad3e812f-b846-3ac2-a46b-830893eba8b1"
    ]
};

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 aPg6cEkaveZ3dV6fh4D58b1

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

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

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

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 g6aVhkZe6d53EfP1v8Dacb4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"95323317-c91f-3095-9ca5-2865d2a0a504\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "95323317-c91f-3095-9ca5-2865d2a0a504"
    ]
};

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 g6aVhkZe6d53EfP1v8Dacb4

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "id",
            "display_name": "Reiciendis at fugiat exercitationem sequi voluptas."
        },
        {
            "id": null,
            "name": "earum",
            "display_name": "Sed placeat in id soluta incidunt."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer 4635acVP6dfZDv8haekbgE1

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


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

Example response (200):


{
    "data": [
        {
            "id": "3f3413b3-4d66-3a6a-8609-ee7a50843e30",
            "description": "Dr. Mariana Gisela Camacho",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "bfa85440-421c-30a8-9eb2-cab0e48ed352",
            "description": "Luna de Souza",
            "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 Vhgk1E6cPdbDaZ5a38fe46v

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 h65bvcZaEPDek86a43d1fVg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"ed825716-b1e4-3b82-85bb-cd065abb4b68\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Example Description",
    "work_id": "ed825716-b1e4-3b82-85bb-cd065abb4b68"
};

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 h65bvcZaEPDek86a43d1fVg

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: ed825716-b1e4-3b82-85bb-cd065abb4b68

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


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

Example response (200):


{
    "data": {
        "id": "4692bab2-b184-3eb4-8a86-aca1100473da",
        "description": "Dr. Rafael Cordeiro Ferraz",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer 83E5fZ66vdaPeD1kag4cbhV

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 vabahgdEfV56De6kcZ34P18" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"b79da466-00a0-3f36-abe2-e439e7d4174a\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Example Description",
    "work_id": "b79da466-00a0-3f36-abe2-e439e7d4174a"
};

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 vabahgdEfV56De6kcZ34P18

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: b79da466-00a0-3f36-abe2-e439e7d4174a

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "dc31fa11-1d3e-33d9-ada4-5d27c080af39",
            "name": "Raquel Mirela Teles Filho",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "product_quantity_lists_count": 0,
            "product_quantity_list_items_count": 0,
            "product_requests_count": 0,
            "product_request_items_count": 0,
            "documents_count": 0,
            "locations_documents_count": 0,
            "total_documents_count": 0,
            "daily_logs_count": 0,
            "projects_count": 0,
            "started_at": {
                "date": "2013-02-05 06:29:47.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f5489377-bb0a-3855-9c49-faeb254ee1c4",
            "name": "Dr. Ayla Aragão Camacho Filho",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "product_quantity_lists_count": 0,
            "product_quantity_list_items_count": 0,
            "product_requests_count": 0,
            "product_request_items_count": 0,
            "documents_count": 0,
            "locations_documents_count": 0,
            "total_documents_count": 0,
            "daily_logs_count": 0,
            "projects_count": 0,
            "started_at": {
                "date": "1985-04-14 22:49:00.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 b1he6gPVZ38E4Da5adkc6fv

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 31g6V684dkahZEPacbevfD5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"2bd4944c-ae03-3584-b39e-de2efe038f0f\",
    \"status_id\": \"3c4e6521-ec6d-3ec9-8566-05c99af83c69\",
    \"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 31g6V684dkahZEPacbevfD5",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "2bd4944c-ae03-3584-b39e-de2efe038f0f",
    "status_id": "3c4e6521-ec6d-3ec9-8566-05c99af83c69",
    "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 31g6V684dkahZEPacbevfD5

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: 2bd4944c-ae03-3584-b39e-de2efe038f0f

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: 3c4e6521-ec6d-3ec9-8566-05c99af83c69

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


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

Example response (200):


{
    "data": {
        "id": "acc05a8c-3873-380a-b3d6-93a2fdb7c773",
        "name": "Dr. Alan Quintana",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents": [],
        "locations": [],
        "product_quantity_lists_count": 0,
        "product_quantity_list_items_count": 0,
        "product_requests_count": 0,
        "product_request_items_count": 0,
        "documents_count": 0,
        "locations_documents_count": 0,
        "total_documents_count": 0,
        "daily_logs_count": 0,
        "projects_count": 0,
        "started_at": {
            "date": "2025-11-23 02:08:18.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer f65Z3bh6gak8dvPDE41ceVa

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 861DEPvVc5fga6ehbdaZk43" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"46a04f10-8a94-3836-8322-5eb6aa937967\",
    \"status_id\": \"de025dfc-5d2c-32b4-ac85-7a1540d19500\",
    \"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 861DEPvVc5fga6ehbdaZk43",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "46a04f10-8a94-3836-8322-5eb6aa937967",
    "status_id": "de025dfc-5d2c-32b4-ac85-7a1540d19500",
    "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 861DEPvVc5fga6ehbdaZk43

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: 46a04f10-8a94-3836-8322-5eb6aa937967

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: de025dfc-5d2c-32b4-ac85-7a1540d19500

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "d04f9e37-8688-3636-be20-39d4091d0195",
            "name": "Glen Jerde",
            "username": "crona.ocie",
            "email": "damon.johnson@example.net",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "660a5a0f-6b5f-3c71-9531-7bb349898708",
            "name": "Letha Heathcote",
            "username": "minerva.trantow",
            "email": "glover.edwardo@example.org",
            "certification": null,
            "crea": null,
            "last_login_at": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/works/{work}/responsibles

Headers

Authorization        

Example: Bearer cbVePD13a4g8dZ6a5hk6fvE

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 V8aceZf6vk6DdaPb53g41Eh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"af0f1a7e-54fa-3070-92d0-3ae15f2eea1e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

let body = {
    "users": [
        "af0f1a7e-54fa-3070-92d0-3ae15f2eea1e"
    ]
};

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 V8aceZf6vk6DdaPb53g41Eh

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 bEfPgdvch6k843eVa6D1aZ5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"77add391-a650-3582-bae0-25424606bfa6\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

let body = {
    "users": [
        "77add391-a650-3582-bae0-25424606bfa6"
    ]
};

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 bEfPgdvch6k843eVa6D1aZ5

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 a6VagvZD4h38cfb1kdE6Pe5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"3f2b4368-5a90-3a21-a3eb-4d26f4f9818d\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

let body = {
    "users": [
        "3f2b4368-5a90-3a21-a3eb-4d26f4f9818d"
    ]
};

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 a6VagvZD4h38cfb1kdE6Pe5

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.