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


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

Example response (200):


{
    "data": [
        {
            "id": "7c7acd9f-9c36-3149-9be2-f5437c70eb9a",
            "name": "mollitia-6a6208fd3488c",
            "display_name": "Repellat repellat placeat itaque rerum alias quia.",
            "permissions_count": null
        },
        {
            "id": "1e899f3e-9ad7-3265-a69e-ce9fa6d09298",
            "name": "eaque-6a6208fd399a1",
            "display_name": "Qui odit corporis voluptatibus odit molestiae esse iure quo.",
            "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 Vdk6h3aZP56vc81DE4fgaeb

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 58PdabEchk6f16v3DeZVa4g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"0fd0b056-f972-3ff2-91b6-08cec5c195ee\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "0fd0b056-f972-3ff2-91b6-08cec5c195ee"
    ]
};

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

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 bv38fg56DPh4e6c1EdVakZa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"6490d869-c029-350b-b242-8df7071e6ec0\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "6490d869-c029-350b-b242-8df7071e6ec0"
    ]
};

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 bv38fg56DPh4e6c1EdVakZa

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


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

Example response (200):


{
    "data": {
        "id": "625b83f0-e10e-35a8-8f35-7a850c37a7e3",
        "name": "adipisci-6a6208fd474c1",
        "display_name": "Alias cum nulla ipsam et sed.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer aaE45f8Z6d6Dh3PgVckv1eb

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "quas",
            "display_name": "Ea laudantium quia nostrum quis ea nostrum quis."
        },
        {
            "id": null,
            "name": "et",
            "display_name": "Voluptas exercitationem magni dolores in."
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer bhafd6v6k4a5cE8g31DVeZP

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "et",
            "display_name": "Rerum et error ut et doloribus fuga ab."
        },
        {
            "id": null,
            "name": "aspernatur",
            "display_name": "Quo enim debitis optio non."
        }
    ],
    "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 P45h66DfVagc83Zvae1Ekdb

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

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "name": "temporibus",
        "display_name": "Et et consequatur explicabo suscipit perferendis."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer 8D1Z6dkVPbvfh4ce3aa6g5E

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "2e1a61d7-0643-388b-a9e1-d9c02bec9ca8",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 6998.44,
            "due_date": "2026-08-20T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Corporis commodi aut magnam aspernatur dolorum magni eius rerum.",
            "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": "maiores",
            "field2": 20,
            "field3": true,
            "notes": "Qui sed suscipit quos ut fugiat.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "9ac2c23f-a526-392c-aa2e-49fbdec73882",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 9872.15,
            "due_date": "2026-08-19T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Delectus laboriosam earum eius est quae est non.",
            "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": "nam",
            "field2": 78,
            "field3": true,
            "notes": "Deserunt qui corrupti totam qui fugiat sed.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer 16a3fhegDab8E5cvVdZ4k6P

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

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

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

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[]=quia&suppliers[]=aut&works[]=est&statuses[]=protestado&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-07-23T09%3A28%3A45&protest_date_end=2026-07-23T09%3A28%3A45&has_protest=&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer EV3g4D586habdPkac1e6fZv" \
    --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]": "quia",
    "suppliers[0]": "aut",
    "works[0]": "est",
    "statuses[0]": "protestado",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-07-23T09:28:45",
    "protest_date_end": "2026-07-23T09:28:45",
    "has_protest": "0",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "bde1e1b9-90bd-379a-a0f5-f6dad0ac5465",
            "code": null,
            "type": "saída",
            "payment_method": "cheque",
            "amount": 7854.55,
            "due_date": "2026-08-07T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Officia itaque eos ut repellendus repellat est omnis nulla quo vitae ut.",
            "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": "cum",
            "field2": 87,
            "field3": false,
            "notes": "Exercitationem facere et ut rerum voluptas.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d57f7da1-02e2-38ec-a3ae-e972713b6db4",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 9879.41,
            "due_date": "2026-08-04T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Ut modi quae eaque aut sed numquam porro quo rerum laudantium eligendi omnis corporis.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "unde",
            "field2": 94,
            "field3": false,
            "notes": "Ea aspernatur dolorum facilis consequuntur et.",
            "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 EV3g4D586habdPkac1e6fZv

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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

Payment method. Example: cheque

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

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

date_end   string  optional    

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

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-23T09:28:45

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-23T09:28:45

has_protest   boolean  optional    

Example: false

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

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

List accounts payable receivable

requires authentication accounts-payable-receivable index

List all accounts payable receivable

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "53dfd32b-8a26-3d89-8afc-f58693794548",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 7150.28,
            "due_date": "2026-08-10T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Blanditiis tempore vitae dolores sed totam doloribus 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": "qui",
            "field2": 78,
            "field3": false,
            "notes": "Sit deleniti et expedita aut rerum occaecati.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6607e3f6-b210-33b9-a538-8b36938857dd",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 4451.48,
            "due_date": "2026-08-03T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Vel alias omnis ut in qui est modi pariatur corporis asperiores aut rerum.",
            "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": "aut",
            "field2": 70,
            "field3": false,
            "notes": "Adipisci veniam in deserunt ut similique.",
            "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 g14EVdvZbePcf65k68aDha3

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

code   string  optional    

Filter by account code. Example: CPR-000123

type   string  optional    

Type. Example: entrada

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

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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

Payment method. Example: cheque

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

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

date_end   string  optional    

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

protest_date_start   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-23T09:28:45

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-23T09:28:45

has_protest   boolean  optional    

Example: true

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

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

Create accounts payable receivable

requires authentication accounts-payable-receivable store

Create a new accounts payable receivable

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable" \
    --header "Authorization: Bearer aPE8vZhkbD3f4V5cad1g66e" \
    --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\": \"ae0b866c-d07e-39c2-ac8d-d7bc6ec1014e\",
    \"customer_id\": \"29a65172-ea22-31ab-98a7-47c26739c58e\",
    \"work_id\": \"0dea71cd-3ba6-32a4-a162-50f985fab4d4\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"b73ec412-2462-379e-88de-2741e8d2bad7\",
    \"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 aPE8vZhkbD3f4V5cad1g66e",
    "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": "ae0b866c-d07e-39c2-ac8d-d7bc6ec1014e",
    "customer_id": "29a65172-ea22-31ab-98a7-47c26739c58e",
    "work_id": "0dea71cd-3ba6-32a4-a162-50f985fab4d4",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "b73ec412-2462-379e-88de-2741e8d2bad7",
    "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 aPE8vZhkbD3f4V5cad1g66e

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

type   string     

Tipo. Example: Example Type

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

Forma de pagamento. Example: Example Payment method

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

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

amount   number     

Valor. Example: 1

description   string     

Descrição. Example: Example Description

supplier_id   string  optional    

Fornecedor. The uuid of an existing record in the suppliers table. Example: ae0b866c-d07e-39c2-ac8d-d7bc6ec1014e

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: 29a65172-ea22-31ab-98a7-47c26739c58e

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 0dea71cd-3ba6-32a4-a162-50f985fab4d4

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: b73ec412-2462-379e-88de-2741e8d2bad7

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.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe" \
    --header "Authorization: Bearer a53e84bDcVdvh6Zg6EPk1fa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fiscal_document_id\": \"autem\",
    \"installment_ids\": [
        \"voluptatem\"
    ],
    \"payment_method\": \"outro\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/accounts-payable-receivable/import-nfe"
);

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

let body = {
    "fiscal_document_id": "autem",
    "installment_ids": [
        "voluptatem"
    ],
    "payment_method": "outro"
};

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 a53e84bDcVdvh6Zg6EPk1fa

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

installment_ids   string[]  optional    

The uuid of an existing record in the fiscal_document_installments table.

payment_method   string  optional    

Example: outro

Must be one of:
  • cheque
  • boleto
  • outro

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: dolorem

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

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


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

Example response (200):


{
    "data": {
        "id": "6505b572-b82a-3f67-b85a-b2413c59af72",
        "code": null,
        "type": "entrada",
        "payment_method": "cheque",
        "amount": 328.16,
        "due_date": "2026-08-02T03: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": "Voluptatem corporis veniam amet maiores iste distinctio est nisi id similique perspiciatis est.",
        "is_recurring": null,
        "recurrence_config": null,
        "parent_id": null,
        "recurrence_order": 1,
        "total_recurrences": null,
        "children_count": 0,
        "remaining_recurrences": null,
        "has_children": false,
        "field1": "ea",
        "field2": 97,
        "field3": false,
        "notes": "Reprehenderit perferendis commodi eligendi esse.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 1Zv48kfPEa6bcg5ahV6dDe3

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: non

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/doloribus" \
    --header "Authorization: Bearer abh51V6f3aDcZeP8d46vgkE" \
    --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\": \"4b4ef254-6561-389d-8633-5d01e0532eb6\",
    \"customer_id\": \"91684e1e-098f-386b-8742-be0681fb610f\",
    \"work_id\": \"8eb5e66c-d3aa-359c-947c-7ccfc82b5285\",
    \"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\": \"1bc408d5-b140-3f9b-bffb-6a8358dcf524\",
    \"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/doloribus"
);

const headers = {
    "Authorization": "Bearer abh51V6f3aDcZeP8d46vgkE",
    "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": "4b4ef254-6561-389d-8633-5d01e0532eb6",
    "customer_id": "91684e1e-098f-386b-8742-be0681fb610f",
    "work_id": "8eb5e66c-d3aa-359c-947c-7ccfc82b5285",
    "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": "1bc408d5-b140-3f9b-bffb-6a8358dcf524",
    "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 abh51V6f3aDcZeP8d46vgkE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: doloribus

Body Parameters

type   string  optional    

Type. Example: Example Type

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

Payment method. Example: Example Payment method

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

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

amount   number  optional    

Amount. Example: 1

description   string  optional    

Description. Example: Example Description

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 4b4ef254-6561-389d-8633-5d01e0532eb6

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 91684e1e-098f-386b-8742-be0681fb610f

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 8eb5e66c-d3aa-359c-947c-7ccfc82b5285

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: 1bc408d5-b140-3f9b-bffb-6a8358dcf524

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: illo

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\": \"lilliana.becker@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": "lilliana.becker@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: lilliana.becker@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 ae4kf1ZaVv6d3DcgEh6P58b" \
    --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 ae4kf1ZaVv6d3DcgEh6P58b",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": {
        "id": "4e469575-a5fa-31f7-9a90-c14779a68a28",
        "name": "Minerva Rodriguez PhD",
        "username": "fwolf",
        "email": "oconnell.yadira@example.org",
        "ability": [
            {
                "action": "read",
                "subject": "Auth"
            },
            {
                "action": "listar",
                "subject": "padrão"
            }
        ],
        "roles": [],
        "preferences": [],
        "sectors": [],
        "image": {
            "id": null,
            "url": null
        }
    }
}
 

Request      

GET api/auth/user

Headers

Authorization        

Example: Bearer ae4kf1ZaVv6d3DcgEh6P58b

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 6bg4E6akeah5vdcVZfP183D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"jkautzer\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"d25d2ae3-2d4f-386b-a1a1-fca66853924b\"
    ],
    \"roles\": [
        \"8c544f5f-db2d-3b54-a9e0-f28752ad0b2e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "jkautzer",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "d25d2ae3-2d4f-386b-a1a1-fca66853924b"
    ],
    "roles": [
        "8c544f5f-db2d-3b54-a9e0-f28752ad0b2e"
    ]
};

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

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

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

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

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

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

let body = {
    "key": "t",
    "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 5fceh46a63gZPvdE8VDak1b

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: et

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: sit

Deposit into bank account

requires authentication bank-account deposit

Adds funds to a bank account

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 15

Body Parameters

amount   number     

Amount. Example: 1

description   string  optional    

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

transaction_date   string     

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

transaction_category_id   string  optional    

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

Withdraw from bank account

requires authentication bank-account withdraw

Removes funds from a bank account

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 16

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

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


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

Example response (200):


{
    "data": {
        "id": "183f4be4-be61-3723-9581-19a00d43a542",
        "agency": "7190",
        "account": "4095866-0",
        "type": "poupança",
        "balance": 4550.56,
        "holder_type": "pf",
        "alias": "accusamus",
        "limit": 8265.69,
        "available_balance": 12816.25,
        "used_limit": 0,
        "available_limit": 8265.69,
        "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 PaZ861D5dbv6hkfgeE4ca3V

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


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

Example response (200):


{
    "data": [
        {
            "id": "978f7124-c975-32fd-90aa-6ce8deb47566",
            "agency": "0190",
            "account": "5808787-6",
            "type": "corrente",
            "balance": 2230.19,
            "holder_type": "pj",
            "alias": "harum",
            "limit": 6263.95,
            "available_balance": 8494.14,
            "used_limit": 0,
            "available_limit": 6263.95,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4bcaf656-1ba9-3859-94c8-e30719126610",
            "agency": "8619",
            "account": "4668513-0",
            "type": "corrente",
            "balance": 9225.56,
            "holder_type": "pf",
            "alias": "dolorem",
            "limit": 178.57,
            "available_balance": 9404.13,
            "used_limit": 0,
            "available_limit": 178.57,
            "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 5Pk6h63agcZaV1b48vedfED

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 DZdba68ehPkv31a5gfc4EV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"6614780-3\",
    \"bank_id\": \"1250551e-59ef-3f7a-ade7-c172ee81e2f2\",
    \"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 DZdba68ehPkv31a5gfc4EV6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "6614780-3",
    "bank_id": "1250551e-59ef-3f7a-ade7-c172ee81e2f2",
    "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 DZdba68ehPkv31a5gfc4EV6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 6614780-3

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: 1250551e-59ef-3f7a-ade7-c172ee81e2f2

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/8" \
    --header "Authorization: Bearer Da4cg6e3E6hZv158VPfadbk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"0140027-4\",
    \"bank_id\": \"22962fc5-19b9-37d3-b069-06f6cba202cd\",
    \"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/8"
);

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

let body = {
    "agency": "Example Agency",
    "account": "0140027-4",
    "bank_id": "22962fc5-19b9-37d3-b069-06f6cba202cd",
    "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 Da4cg6e3E6hZv158VPfadbk

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 8

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 0140027-4

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: 22962fc5-19b9-37d3-b069-06f6cba202cd

type   string  optional    

Type. Example: Example Type

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

Holder type. Example: Example Holder type

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

Alias. Example: Example Alias

balance   number  optional    

Balance. Example: 1

limit   number  optional    

Limit. Example: 1

is_default   boolean  optional    

Is default. Example: true

default_payment_method   string  optional    

Default payment method. Example: Example Default payment method

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

Show bank account

requires authentication bank-account show

Show a bank account

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

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


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

Example response (200):


{
    "data": {
        "id": "a2d9163a-49f1-33ec-b8b2-8634f2eba4bd",
        "agency": "8953",
        "account": "1742099-6",
        "type": "caixa",
        "balance": 3756.32,
        "holder_type": "pj",
        "alias": "sit",
        "limit": 6724.24,
        "available_balance": 10480.56,
        "used_limit": 0,
        "available_limit": 6724.24,
        "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 615ZEadPVahf4cvbg8k63De

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 9

Delete bank account

requires authentication bank-account delete

Delete a bank account

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 9

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 15

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/3/statements" \
    --header "Authorization: Bearer E3gd5ZvkDe4f1a6c8a6VPhb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"repellendus\",
    \"sort_desc\": true,
    \"page\": 84,
    \"per_page\": 13,
    \"q\": \"wlroppxdjyolxssuuz\",
    \"type\": \"ajuste saída\",
    \"date_start\": \"2026-07-23T09:28:46\",
    \"date_end\": \"2048-11-15\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/3/statements"
);

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

let body = {
    "sort_by": "repellendus",
    "sort_desc": true,
    "page": 84,
    "per_page": 13,
    "q": "wlroppxdjyolxssuuz",
    "type": "ajuste saída",
    "date_start": "2026-07-23T09:28:46",
    "date_end": "2048-11-15"
};

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 E3gd5ZvkDe4f1a6c8a6VPhb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 3

Body Parameters

sort_by   string  optional    

Example: repellendus

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

type   string  optional    

Example: ajuste saída

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

O campo value deve ser uma data válida. Example: 2026-07-23T09:28:46

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: 2048-11-15

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 4

bankStatement   string     

Example: soluta

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


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

Example response (200):


{
    "data": [
        {
            "id": "5c5b7559-bd27-333e-86a4-2fd15b0ee3c5",
            "name": "Santacruz-Garcia",
            "code": "490"
        },
        {
            "id": "a506d887-005d-3010-846e-28700db6e481",
            "name": "Amaral-Fontes",
            "code": "666"
        }
    ],
    "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 c1h45fDadEaV86b3gvk6ZeP

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

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

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


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

Example response (200):


{
    "data": {
        "id": "07418459-2043-31f1-90d0-039cf4be7028",
        "name": "Faria-Brito",
        "code": "108"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer Zd5a8Pfvbc34g6kDE1h6aeV

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

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

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=Aut+et+dolorem+nesciunt+consectetur+consequatur+est.&categories[]=similique&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=velit&customers[]=aliquam&suppliers[]=provident&works[]=qui" \
    --header "Authorization: Bearer 6D8efEhZa5gcbkVd634Pa1v" \
    --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": "Aut et dolorem nesciunt consectetur consequatur est.",
    "categories[0]": "similique",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "velit",
    "customers[0]": "aliquam",
    "suppliers[0]": "provident",
    "works[0]": "qui",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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: Aut et dolorem nesciunt consectetur consequatur est.

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=Eligendi+iusto+sapiente+iusto+non+provident+sed+dolores.&categories[]=odio&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=dolore&customers[]=unde&suppliers[]=qui&works[]=reprehenderit" \
    --header "Authorization: Bearer g4v6e6Z3adEhacfb8V1D5Pk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows"
);

const params = {
    "sort_by": "created_at",
    "sort_desc": "1",
    "page": "1",
    "per_page": "15",
    "q": "Salary",
    "cash_session": "uuid",
    "type": "entrada",
    "description": "Eligendi iusto sapiente iusto non provident sed dolores.",
    "categories[0]": "odio",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "dolore",
    "customers[0]": "unde",
    "suppliers[0]": "qui",
    "works[0]": "reprehenderit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "fad6a0e3-038c-30d3-b6ae-adcada5104d5",
            "code": "FC-07131328",
            "type": "ajuste saída",
            "amount": -4462.48,
            "description": "Officiis numquam nobis quas debitis nam veniam id.",
            "transaction_date": "1997-12-11T02:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "a76ca91d-82f5-3931-a64a-2f227611ec07",
            "code": "FC-08308620",
            "type": "transferência",
            "amount": -8159.49,
            "description": "Autem aut est qui dignissimos sint nam at.",
            "transaction_date": "1978-11-19T03: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 g4v6e6Z3adEhacfb8V1D5Pk

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Salary

cash_session   string  optional    

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

type   string  optional    

Cash flow type. Example: entrada

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

Description . Example: Eligendi iusto sapiente iusto non provident sed dolores.

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 bh8Ed56DZ4g31VvPcfka6ae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"2e2f6750-4cf3-33f0-a650-4a31166ea2eb\",
    \"transaction_category_id\": \"cf6b3f53-c4ed-3de3-a714-7360ee1194a7\",
    \"bank_account_id\": \"10b1429a-7462-3597-beb2-c4f09ade6cef\",
    \"customer_id\": \"e9ecb85f-043e-33d7-b69a-b13e8bfefba0\",
    \"supplier_id\": \"dfa2fbcf-29ba-31fe-b269-ff88bdd46832\",
    \"work_id\": \"bde53249-7a25-30e9-b310-3e28ff0107b6\",
    \"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 bh8Ed56DZ4g31VvPcfka6ae",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "2e2f6750-4cf3-33f0-a650-4a31166ea2eb",
    "transaction_category_id": "cf6b3f53-c4ed-3de3-a714-7360ee1194a7",
    "bank_account_id": "10b1429a-7462-3597-beb2-c4f09ade6cef",
    "customer_id": "e9ecb85f-043e-33d7-b69a-b13e8bfefba0",
    "supplier_id": "dfa2fbcf-29ba-31fe-b269-ff88bdd46832",
    "work_id": "bde53249-7a25-30e9-b310-3e28ff0107b6",
    "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 bh8Ed56DZ4g31VvPcfka6ae

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: 2e2f6750-4cf3-33f0-a650-4a31166ea2eb

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: cf6b3f53-c4ed-3de3-a714-7360ee1194a7

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 10b1429a-7462-3597-beb2-c4f09ade6cef

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: e9ecb85f-043e-33d7-b69a-b13e8bfefba0

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: dfa2fbcf-29ba-31fe-b269-ff88bdd46832

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: bde53249-7a25-30e9-b310-3e28ff0107b6

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

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


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

Example response (200):


{
    "data": {
        "id": "9ad1fe8a-e3ac-3e10-84eb-3f5de1f98bfa",
        "code": "FC-97502817",
        "type": "ajuste",
        "amount": 7608.32,
        "description": "Sapiente maxime dicta perferendis beatae et nam.",
        "transaction_date": "1977-05-09T03: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 fkhPa61EDaZc8Vb5g4vd36e

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 10

Update cash flow

requires authentication cash-flow update

Update a cash flow

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/3" \
    --header "Authorization: Bearer da1P6vEkbgcaVfD5Ze348h6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"cf40d1d9-b87c-381c-8515-ae5f151e97b2\",
    \"transaction_category_id\": \"633de111-8199-32a1-9f97-9a752f54557c\",
    \"bank_account_id\": \"79f7e5c1-2001-37b7-ace3-10f15b9b89fe\",
    \"customer_id\": \"5d0bd733-18a4-315f-a912-909f0bd2b0ab\",
    \"supplier_id\": \"e40ec948-f46f-3c87-b4f1-21521f01e736\",
    \"work_id\": \"8bc4ea73-9293-3292-a345-6e51c9704c95\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/3"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "cf40d1d9-b87c-381c-8515-ae5f151e97b2",
    "transaction_category_id": "633de111-8199-32a1-9f97-9a752f54557c",
    "bank_account_id": "79f7e5c1-2001-37b7-ace3-10f15b9b89fe",
    "customer_id": "5d0bd733-18a4-315f-a912-909f0bd2b0ab",
    "supplier_id": "e40ec948-f46f-3c87-b4f1-21521f01e736",
    "work_id": "8bc4ea73-9293-3292-a345-6e51c9704c95",
    "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 da1P6vEkbgcaVfD5Ze348h6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 3

Body Parameters

type   string  optional    

Type. Example: Example Type

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

Cash session id. The uuid of an existing record in the cash_sessions table. Example: cf40d1d9-b87c-381c-8515-ae5f151e97b2

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: 633de111-8199-32a1-9f97-9a752f54557c

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 79f7e5c1-2001-37b7-ace3-10f15b9b89fe

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 5d0bd733-18a4-315f-a912-909f0bd2b0ab

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: e40ec948-f46f-3c87-b4f1-21521f01e736

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 8bc4ea73-9293-3292-a345-6e51c9704c95

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 18

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


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

Example response (200):


{
    "data": [
        {
            "id": "f44a846a-b814-36e5-b2f2-d421f40023c1",
            "code": null,
            "opened_by": null,
            "opened_at": "1989-05-03T08:38:23.000000Z",
            "closed_by": null,
            "closed_at": "1978-10-19T19:13:53.000000Z",
            "opening_balance": 8380.32,
            "closing_balance": 6187.68,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Aberto",
            "hasSnapshot": false,
            "created_at": "1987-05-05T06:26:01.000000Z",
            "updated_at": "2021-02-06T19:18:40.000000Z"
        },
        {
            "id": "49e1a36d-0468-3fd2-8f29-33771ae1e7ea",
            "code": null,
            "opened_by": null,
            "opened_at": "1997-03-02T09:52:31.000000Z",
            "closed_by": null,
            "closed_at": "2003-02-13T05:42:38.000000Z",
            "opening_balance": 6880.36,
            "closing_balance": 1567.61,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "1996-04-19T10:28:41.000000Z",
            "updated_at": "1998-10-06T05:04:13.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 e8bvZ6fkV5cagad143hP6DE

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


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

Example response (200):


{
    "data": {
        "id": "6f20be5c-d07d-3a7f-8d20-41ead4030d31",
        "code": null,
        "opened_by": null,
        "opened_at": "1985-12-18T09:04:11.000000Z",
        "closed_by": null,
        "closed_at": "1991-03-31T18:35:27.000000Z",
        "opening_balance": 9328.07,
        "closing_balance": 4295.62,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "hasSnapshot": false,
        "created_at": "2024-02-07T17:15:51.000000Z",
        "updated_at": "1971-12-25T22:59:23.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer VEa384Pefkv61gdaDb6Zch5

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/df9df577-c316-3404-94cd-03b26023a677" \
    --header "Authorization: Bearer Pk6cg8df6avZah5e4b3D1EV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/df9df577-c316-3404-94cd-03b26023a677"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: df9df577-c316-3404-94cd-03b26023a677

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/8bb65c20-bd02-363d-bd11-1bdc9e348bf4/account-snapshot" \
    --header "Authorization: Bearer gaZ5Pk4Dhf3bVcv1Edae866" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/8bb65c20-bd02-363d-bd11-1bdc9e348bf4/account-snapshot"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 8bb65c20-bd02-363d-bd11-1bdc9e348bf4

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/0ea505c2-2475-3505-abfe-787e361a5351" \
    --header "Authorization: Bearer fEaZev8kdhc54VD1a663bPg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/0ea505c2-2475-3505-abfe-787e361a5351"
);

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


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

Example response (200):


{
    "data": {
        "id": "7403863d-dd2a-3be2-bee3-8e17a3990808",
        "code": null,
        "opened_by": null,
        "opened_at": "1985-05-02T05:11:46.000000Z",
        "closed_by": null,
        "closed_at": "1973-08-19T23:08:18.000000Z",
        "opening_balance": 9276.54,
        "closing_balance": 2550.75,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "hasSnapshot": false,
        "created_at": "1994-11-14T00:12:36.000000Z",
        "updated_at": "2011-05-08T03:39:32.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer fEaZev8kdhc54VD1a663bPg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 0ea505c2-2475-3505-abfe-787e361a5351

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/ff4a7db2-61e5-390e-a389-46c1b1b8b1ba" \
    --header "Authorization: Bearer P3dgEvD8ehc6aZf6ba54k1V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/ff4a7db2-61e5-390e-a389-46c1b1b8b1ba"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: ff4a7db2-61e5-390e-a389-46c1b1b8b1ba

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 aeV1fZbgd84kaE6vP35hcD6" \
    --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\": \"de467bb0-ae9c-3645-9a2b-1282e1828353\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/contracts"
);

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

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "de467bb0-ae9c-3645-9a2b-1282e1828353"
};

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

Example response (200):


{
    "data": [
        {
            "id": "7d6acc6f-4c6c-3819-a902-cdfd1455dbc2",
            "number": "295/2026",
            "started_at": "2026-07-23",
            "deadline_at": "2027-07-23",
            "work": {
                "id": "a253d6f9-464e-4be0-80a0-2048d09d8a94",
                "name": "Luis Ferreira Sobrinho"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d3e7c647-011e-39ea-818a-adacbfc3e1fc",
            "number": "342/2026",
            "started_at": "2026-07-23",
            "deadline_at": "2027-07-23",
            "work": {
                "id": "a253d6f9-519d-4696-a098-4442487fb35f",
                "name": "Dr. Gustavo Simão Fidalgo"
            },
            "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 aeV1fZbgd84kaE6vP35hcD6

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: de467bb0-ae9c-3645-9a2b-1282e1828353

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 gb463D86vedZaVhEP1akf5c" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"work_id\": \"8559ed24-17f1-384d-ae0f-3a2ca5f43d8e\",
    \"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 gb463D86vedZaVhEP1akf5c",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "work_id": "8559ed24-17f1-384d-ae0f-3a2ca5f43d8e",
    "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 gb463D86vedZaVhEP1akf5c

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: 8559ed24-17f1-384d-ae0f-3a2ca5f43d8e

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

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


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

Example response (200):


{
    "data": {
        "id": "0f399db1-350a-3457-8c54-96b65e8d1c91",
        "number": "133/2026",
        "started_at": "2026-07-23",
        "deadline_at": "2027-07-23",
        "work": {
            "id": "a253d6f9-60e7-49c5-967e-2b857b655cbb",
            "name": "Sra. Karina Sales"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/contracts/{id}

Headers

Authorization        

Example: Bearer bdaD3caZgk4ve1VEP5h6f68

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contract. Example: 18

contract   string     

Contract UUID Example: sed

Update contract

requires authentication contract update

Update a work contract

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

contract   string     

Contract UUID Example: nostrum

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


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

Example response (200):


{
    "data": [
        {
            "id": "604ddccb-23ab-3883-a438-331c92e38cbd",
            "name": "Yasmin Galhardo",
            "email": "qassuncao@example.org",
            "phone": "(64) 97362-2252",
            "document": "928.476.148-42",
            "type": "pf",
            "responsible": "Dr. Kelly Cordeiro Correia Sobrinho",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents_count": 0
        },
        {
            "id": "84374477-39c5-3692-bb9e-0a0e0e0f9fcc",
            "name": "Dr. Gisele Gabi Brito",
            "email": "sortiz@example.net",
            "phone": "(69) 93362-6608",
            "document": "911.141.510-09",
            "type": "pj",
            "responsible": "Gabrielle Godói",
            "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 aZPbed3E6VDg5vf4k18h6ca

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

email   string  optional    

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

phone   string  optional    

Telefone. Example: (11) 99999-9999

document   string     

CPF/CNPJ. Example: Example Document

type   string     

Tipo. Example: Example Type

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

Responsável. Example: Example Responsible

image   object  optional    

Imagem.

path   string  optional    

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

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

address   object     

Endereço.

street   string     

Rua. Example: Example Address street

number   string     

Número. Example: Example Address number

complement   string  optional    

Complemento. Example: Example Address complement

neighborhood   string     

Bairro. Example: Example Address neighborhood

city   string     

Cidade. Example: Example Address city

state   string     

Estado. Example: Example Address state

zip_code   string     

CEP. Example: Example Address zip code

Get customer

requires authentication customers index

Get a customer

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

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


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

Example response (200):


{
    "data": {
        "id": "f8241f64-90f7-36fa-8339-10e937584b6a",
        "name": "Sra. Alana Rodrigues Quintana Sobrinho",
        "email": "patricia.correia@example.com",
        "phone": "(81) 4147-6944",
        "document": "259.841.971-54",
        "type": "pf",
        "responsible": "Dr. Michele Prado Sobrinho",
        "image": {
            "id": null,
            "url": null
        },
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents_count": 0
    }
}
 

Request      

GET api/customers/{id}

Headers

Authorization        

Example: Bearer afgk3e1Z68v5cEVP4haDdb6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 13

customer   string     

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

Update customer

requires authentication customers update

Update a customer

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 1

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

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 avk6d58PZ6Ef3Dg1cVahbe4" \
    --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\": \"3a7c94f5-7fb8-33e1-8d3f-3e01e01f1df0\",
    \"contract_id\": \"c855776d-8246-35d3-84c6-cb5461d7676a\",
    \"status_id\": \"daf00728-5f91-3da1-a9aa-80e5877e5e52\",
    \"filled_by\": \"a0daa7b5-5a8d-3d99-b3d8-2ab88c6b9440\",
    \"responsible_id\": \"2d62d9a9-9979-3a0d-aab3-a587fd80c4a3\",
    \"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 avk6d58PZ6Ef3Dg1cVahbe4",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sort_by": "Example Sort by",
    "sort_desc": true,
    "page": 1,
    "per_page": 1,
    "work_id": "3a7c94f5-7fb8-33e1-8d3f-3e01e01f1df0",
    "contract_id": "c855776d-8246-35d3-84c6-cb5461d7676a",
    "status_id": "daf00728-5f91-3da1-a9aa-80e5877e5e52",
    "filled_by": "a0daa7b5-5a8d-3d99-b3d8-2ab88c6b9440",
    "responsible_id": "2d62d9a9-9979-3a0d-aab3-a587fd80c4a3",
    "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": "45d173bd-de92-3034-a190-b3406164b2f9",
            "code": "RDO-001",
            "report_number": 1,
            "date": "2026-07-23",
            "status": {
                "id": "a253d6f9-b20e-4563-befa-8751670360f1",
                "slug": null,
                "name": null,
                "abbreviation": "deserunt",
                "color": "#b303e4",
                "text_color": "#04eea6"
            },
            "work": {
                "id": "a253d6f9-a7d7-4b54-bbed-cf842fc42a06",
                "name": "Srta. Mariana Paes Filho",
                "started_at": "1992-06-24 22:13:42"
            },
            "filled_by": {
                "id": "a253d6f9-ae31-47cd-b77c-2363ba153d9d",
                "name": "Creola Bruen"
            },
            "contract_number": "387/2026",
            "deadline_at": "2027-07-23",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d7553f54-0211-3056-8a8c-e4a08068dbb6",
            "code": "RDO-001",
            "report_number": 1,
            "date": "2026-07-23",
            "status": {
                "id": "a253d6f9-bd90-464c-83fe-ea2edd244bfd",
                "slug": null,
                "name": null,
                "abbreviation": "nihil",
                "color": "#a03dbe",
                "text_color": "#07588d"
            },
            "work": {
                "id": "a253d6f9-b726-40ac-af26-9835357b71e6",
                "name": "Inácio Chaves Filho",
                "started_at": "2025-10-23 05:09:08"
            },
            "filled_by": {
                "id": "a253d6f9-bbac-40cc-92d4-44b31536096b",
                "name": "Dr. Lorenza Runolfsdottir"
            },
            "contract_number": "934/2026",
            "deadline_at": "2027-07-23",
            "technical_responsible": {
                "name": null,
                "certification": null,
                "crea": null
            },
            "activities": [],
            "occurrences": null,
            "next_day_forecast": null,
            "finalized_at": null,
            "content_hash": null,
            "gov_br_validation_url": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/daily-logs

Headers

Authorization        

Example: Bearer avk6d58PZ6Ef3Dg1cVahbe4

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: 3a7c94f5-7fb8-33e1-8d3f-3e01e01f1df0

contract_id   string  optional    

Contrato. The uuid of an existing record in the contracts table. Example: c855776d-8246-35d3-84c6-cb5461d7676a

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: daf00728-5f91-3da1-a9aa-80e5877e5e52

filled_by   string  optional    

Preenchido por. The uuid of an existing record in the users table. Example: a0daa7b5-5a8d-3d99-b3d8-2ab88c6b9440

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 2d62d9a9-9979-3a0d-aab3-a587fd80c4a3

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

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

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


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

Example response (200):


{
    "data": {
        "id": "fb4e2a6d-34b5-3395-aa74-3426bf1f74dc",
        "code": "RDO-001",
        "report_number": 1,
        "date": "2026-07-23",
        "status": {
            "id": "a253d6f9-d27f-477b-bc26-745a62e74524",
            "slug": null,
            "name": null,
            "abbreviation": "aperiam",
            "color": "#834168",
            "text_color": "#e98ce0"
        },
        "work": {
            "id": "a253d6f9-cbed-42e5-bd47-5f5c087296d1",
            "name": "Hosana Regiane Pedrosa Sobrinho",
            "started_at": "1992-05-26 04:59:58"
        },
        "filled_by": {
            "id": "a253d6f9-d098-472f-8005-84c09d6d443c",
            "name": "Laurianne Goyette"
        },
        "contract_number": "943/2026",
        "deadline_at": "2027-07-23",
        "technical_responsible": {
            "name": null,
            "certification": null,
            "crea": null
        },
        "activities": [],
        "occurrences": null,
        "next_day_forecast": null,
        "finalized_at": null,
        "content_hash": null,
        "gov_br_validation_url": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/daily-logs/{dailyLog}

Headers

Authorization        

Example: Bearer vadfcgVb646E3aeD5PZk81h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: iste

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 f3hk56cE6VDaebZP81vga4d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"contract_id\": \"Example Contract id\",
    \"date\": \"2024-01-01\",
    \"status_id\": \"836564fe-0885-3160-a666-a6d92292e468\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs"
);

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

let body = {
    "contract_id": "Example Contract id",
    "date": "2024-01-01",
    "status_id": "836564fe-0885-3160-a666-a6d92292e468"
};

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 f3hk56cE6VDaebZP81vga4d

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: 836564fe-0885-3160-a666-a6d92292e468

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/dolores" \
    --header "Authorization: Bearer P1a5b4dvfcZghkD6VaEe386" \
    --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\": \"1655d757-a5a1-4b09-8906-75667eb76887\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/dolores"
);

const headers = {
    "Authorization": "Bearer P1a5b4dvfcZghkD6VaEe386",
    "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": "1655d757-a5a1-4b09-8906-75667eb76887",
            "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 P1a5b4dvfcZghkD6VaEe386

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: dolores

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: 1655d757-a5a1-4b09-8906-75667eb76887

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: non

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/corrupti/signed-document" \
    --header "Authorization: Bearer 8EPVDk36vbd61hZcaf54ega" \
    --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/corrupti/signed-document"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: corrupti

Body Parameters

path   string     

Arquivo assinado. Example: Example Path

name   string  optional    

Nome do arquivo. Example: Example Name

size   string  optional    

Size. Example: Example Size

extension   string  optional    

Extension. Example: Example Extension

gov_br_validation_url   string     

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

Attach photos

requires authentication daily-log update

Attach photographs (already uploaded to storage) to a draft RDO

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/daily-logs/sequi/photos" \
    --header "Authorization: Bearer a6dhEa51keZ684Vfgb3PcDv" \
    --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/sequi/photos"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: sequi

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: et

id   string     

The ID of the photo. Example: et

photo   string     

Photo (File) UUID Example: quia

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: et

photo   string     

Photo (File) UUID Example: labore

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

dailyLog   string     

Daily Log UUID Example: rem

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


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

Example response (200):


{
    "data": [
        {
            "id": "054ed6e0-05d4-3e32-8776-ea18d2017b32",
            "name": "Molestias",
            "code": "CNQ",
            "description": "Et autem delectus dolorem repudiandae.",
            "active": true
        },
        {
            "id": "706ee5bb-0146-3572-9383-7477d1c3426b",
            "name": "Quia",
            "code": "JVO",
            "description": "Ex repellendus omnis voluptas animi laborum.",
            "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 aVha5Z6DcP461bdkEfegv83

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


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

Example response (200):


{
    "data": {
        "id": "80287bac-cf48-3385-b552-e6664eab626f",
        "name": "Eaque",
        "code": "VJE",
        "description": "Necessitatibus qui quia vel nobis rerum totam numquam.",
        "active": true
    }
}
 

Request      

GET api/disciplines/{id}

Headers

Authorization        

Example: Bearer DVda6Zgh6f5E1bP84a3cvek

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

discipline   string     

Discipline UUID Example: voluptatum

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


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

Example response (200):


{
    "data": [
        {
            "id": "7008ebe8-f941-3442-94db-21c534e0ee1b",
            "name": "Agatha Zaragoça Bonilha Neto",
            "description": "Sequi ipsa at quod. Veniam est quo rerum soluta excepturi tempora.",
            "module": "document"
        },
        {
            "id": "c7267a69-27d0-3b59-b529-8964c3dead0d",
            "name": "Cristiana Constância Cruz Neto",
            "description": "Dolor labore est autem quibusdam praesentium. Et accusamus consequatur soluta eaque omnis rerum officiis. Quos deleniti et nobis sequi est repellendus.",
            "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 k8h6Ef4aZVa1P5cb6v3egdD

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

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


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

Example response (200):


{
    "data": {
        "id": "8ce97051-a6a6-32e2-a4f4-70fba1db9f33",
        "name": "Dr. Rodrigo Ferreira Pacheco Jr.",
        "description": "Et temporibus et voluptatum expedita et. Minus non ab blanditiis assumenda quo. Qui doloribus et voluptatibus.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer e6PaEba6h4D583gVdfvkc1Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: temporibus

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: voluptates

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: maxime

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[]=assumenda&documentable_type=est&customers[]=fugiat&suppliers[]=accusantium" \
    --header "Authorization: Bearer Edckb5D1a6g3a6eh48PZfVv" \
    --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]": "assumenda",
    "documentable_type": "est",
    "customers[0]": "fugiat",
    "suppliers[0]": "accusantium",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "8c972e11-8275-33c6-8c83-38a4cf3d7334",
            "name": "Leo Lozano Urias Jr.",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "572ff93f-dbda-34ba-8874-7b63be9f0ca4",
            "name": "Samuel Casanova",
            "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 Edckb5D1a6g3a6eh48PZfVv

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

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

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


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

Example response (200):


{
    "data": {
        "id": "d823f841-b43f-34a7-afdc-f8398e78e539",
        "name": "Vinícius Lourenço Aranda",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer db6Z5fhg1VEDvaa3e6Pk84c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 19

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 aDcvZ4bV5a63eEkgPh61df8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"0f4565d5-e5de-3d84-b68e-8b64c31f7d62\",
    \"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 aDcvZ4bV5a63eEkgPh61df8",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "0f4565d5-e5de-3d84-b68e-8b64c31f7d62",
    "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 aDcvZ4bV5a63eEkgPh61df8

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: 0f4565d5-e5de-3d84-b68e-8b64c31f7d62

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/4" \
    --header "Authorization: Bearer 8akgc6v5a1EZbedVhPf364D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"ef4c501f-955a-35e7-badd-a3fa84a8adc5\",
    \"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/4"
);

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

let body = {
    "name": "Example Name",
    "category_id": "ef4c501f-955a-35e7-badd-a3fa84a8adc5",
    "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 8akgc6v5a1EZbedVhPf364D

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 4

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: ef4c501f-955a-35e7-badd-a3fa84a8adc5

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

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

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

let body = {
    "q": "omnis",
    "renewal_status": "ignored",
    "urgency": "expired",
    "employee_id": "nihil",
    "epi_type_id": "debitis"
};

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 c56dh34EV8veD1kZgaa6bPf

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: omnis

renewal_status   string  optional    

Example: ignored

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

Example: expired

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

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

epi_type_id   string  optional    

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

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

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

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

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

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

Request      

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

Headers

Authorization        

Example: Bearer 1e64vkaa53V8ZcDbfhgdE6P

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: tempora

Body Parameters

quantity   integer  optional    

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

condition   string  optional    

Condição do EPI. Example: new

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

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

Ignore EPI renewal

requires authentication employee-epi update

Ignore expiry alerts for an EPI delivery

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: mollitia

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

EPI delivery UUID Example: dolorem

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

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

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

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

Example response (200):


{
    "data": [
        {
            "id": "75cf32d1-6c0f-3239-8dfa-b35d5ade1167",
            "name": "laboriosam laborum",
            "default_validity_days": 454,
            "requires_signature": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f8ef8f97-377b-3300-b78b-dfb08ec8b8ba",
            "name": "maxime et",
            "default_validity_days": 648,
            "requires_signature": 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/epi-types

Headers

Authorization        

Example: Bearer 3Pd4DgcZaVb6vkae6E85f1h

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: quos

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

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


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

Example response (200):


{
    "data": {
        "id": "3adf66df-4b7c-379d-91ad-c81bfea0c29a",
        "name": "ratione ut",
        "default_validity_days": 89,
        "requires_signature": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer 86bf43aaZPh6V1gdvcDk5eE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: omnis

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

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

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

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

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/epi-types

Headers

Authorization        

Example: Bearer a853keDg6hbZadvPcfV16E4

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

default_validity_days   integer     

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

requires_signature   boolean  optional    

Exige assinatura. Example: true

Update EPI type

requires authentication epi update

Update an EPI type

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/epi-types/unde" \
    --header "Authorization: Bearer akvV8aPeE3bf16d5hD46Zgc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"default_validity_days\": 1,
    \"requires_signature\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/epi-types/unde"
);

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

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

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

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/epi-types/{epiType}

Headers

Authorization        

Example: Bearer akvV8aPeE3bf16d5hD46Zgc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: unde

Body Parameters

name   string     

Nome. Example: Example Name

default_validity_days   integer     

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

requires_signature   boolean  optional    

Exige assinatura. Example: true

Delete EPI type

requires authentication epi delete

Delete an EPI type

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

epiType   string     

EPI type UUID Example: optio

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


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

Example response (200):


{
    "data": [
        {
            "id": "72b84e67-477b-4d88-bdd4-5d9651690a2a",
            "name": "hic",
            "description": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "899b67bc-76d2-47e1-bcfc-82e755281874",
            "name": "in",
            "description": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/employee-roles

Headers

Authorization        

Example: Bearer 146Zebd3hgVDvEf6ak8ac5P

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

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


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

Example response (200):


{
    "data": {
        "id": "f5f47a3b-0199-4128-bd7e-1b9fe0959a5f",
        "name": "dicta",
        "description": "Qui consequatur itaque sed minus nam doloremque voluptatem.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer ab66DEhckfe34g1vP85ZVad

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: quia

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 61k8cEZhfvg5P36b4eaaVdD" \
    --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 61k8cEZhfvg5P36b4eaaVdD",
    "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 61k8cEZhfvg5P36b4eaaVdD

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: laudantium

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: quis

Employees

Endpoints for employees

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


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

Example response (200):


{
    "data": [
        {
            "id": "ad47e2cc-ca96-4e3e-b257-c510aa340ffd",
            "name": "Mateus Vinícius Escobar",
            "cpf": "108.358.713-37",
            "rg": null,
            "ctps": null,
            "phone": null,
            "birthdate": null,
            "email": "hgusmao@example.net",
            "pis_pasep": null,
            "admission_date": "1978-10-29T03:00:00.000000Z",
            "daily_salary": null,
            "monthly_salary": null,
            "nationality": "Singapura",
            "place_of_birth": null,
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": "a253d6fa-aedd-4385-b527-d12675756526",
                "name": "nam"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "89555bb3-12f8-458a-ad42-25340ac11e82",
            "name": "Dr. Natan Jácomo Serna",
            "cpf": "758.512.413-40",
            "rg": "122973326",
            "ctps": "438675594",
            "phone": "(85) 94789-6334",
            "birthdate": null,
            "email": null,
            "pis_pasep": null,
            "admission_date": "1993-11-20T02:00:00.000000Z",
            "daily_salary": "433.14",
            "monthly_salary": "4109.16",
            "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": "a253d6fa-b882-4027-9da6-722e50902372",
                "name": "blanditiis"
            },
            "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/employees

Headers

Authorization        

Example: Bearer 3fb1hPZ64akVE8vgdae5D6c

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

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


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

Example response (200):


{
    "data": {
        "id": "86856cab-ad68-412f-b4d6-4fc2d270b28a",
        "name": "Emerson da Cruz Neto",
        "cpf": "496.174.008-84",
        "rg": "223953022",
        "ctps": "546570123",
        "phone": "(95) 4118-4373",
        "birthdate": "1981-10-03T03:00:00.000000Z",
        "email": "vmaldonado@example.net",
        "pis_pasep": null,
        "admission_date": "2020-11-25T03:00:00.000000Z",
        "daily_salary": null,
        "monthly_salary": "2199.31",
        "nationality": "Irlanda",
        "place_of_birth": null,
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": "a253d6fa-c741-4857-80f2-6a15a92b3640",
            "name": "commodi"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer e16DPa4ZcEVkg6dvhf583ab

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 7

employee   string     

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

Create employee

requires authentication employee store

Create a new employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees" \
    --header "Authorization: Bearer eE6cfgDPhdav5a163b8V4kZ" \
    --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\": \"94995ba4-e7e1-4f63-9f8a-b04ca32abd05\",
    \"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 eE6cfgDPhdav5a163b8V4kZ",
    "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": "94995ba4-e7e1-4f63-9f8a-b04ca32abd05",
    "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 eE6cfgDPhdav5a163b8V4kZ

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: 94995ba4-e7e1-4f63-9f8a-b04ca32abd05

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/18" \
    --header "Authorization: Bearer dakh51e6E68cbagPfZ4VD3v" \
    --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\": \"87bfb042-54b1-4b60-bad4-0afa0880299a\",
    \"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/18"
);

const headers = {
    "Authorization": "Bearer dakh51e6E68cbagPfZ4VD3v",
    "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": "87bfb042-54b1-4b60-bad4-0afa0880299a",
    "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 dakh51e6E68cbagPfZ4VD3v

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 18

employee   string     

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

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: 87bfb042-54b1-4b60-bad4-0afa0880299a

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

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

List employee bank accounts

requires authentication employee-bank-account index

List all bank accounts for an employee

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 7

employee   string     

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

Create employee bank account

requires authentication employee-bank-account store

Add a bank account to an employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/19/bank-account" \
    --header "Authorization: Bearer Z541vcdhebVfE3kD6P8ga6a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"perspiciatis\",
    \"agency\": \"oxfoadudsdtnbkrzs\",
    \"account\": \"pzu\",
    \"account_type\": \"corrente\",
    \"pix_key\": \"urrd\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/19/bank-account"
);

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

let body = {
    "bank_id": "perspiciatis",
    "agency": "oxfoadudsdtnbkrzs",
    "account": "pzu",
    "account_type": "corrente",
    "pix_key": "urrd",
    "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 Z541vcdhebVfE3kD6P8ga6a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 19

employee   string     

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

Body Parameters

bank_id   string     

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

agency   string     

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

account   string     

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

account_type   string     

Example: corrente

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

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

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

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

let body = {
    "bank_id": "nisi",
    "agency": "o",
    "account": "zufolha",
    "account_type": "poupança",
    "pix_key": "rdczopebnqgynhpot",
    "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 fc6k3ZDdPV4bah6Eag851ev

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 16

id   string     

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

employee   string     

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

Body Parameters

bank_id   string  optional    

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

agency   string  optional    

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

account   string  optional    

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

account_type   string  optional    

Example: poupança

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

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

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

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

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

let body = {
    "q": "eligendi",
    "status": "expiring",
    "epi_type_id": "aut"
};

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

Example response (401):

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

{
    "message": "Unauthenticated."
}
 

Request      

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

Headers

Authorization        

Example: Bearer a4gdeDfahbvZkPV15866c3E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 3

employee   string     

Employee UUID Example: excepturi

Body Parameters

q   string  optional    

Example: eligendi

status   string  optional    

Example: expiring

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: tempore

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 10

id   string     

EPI delivery UUID Example: non

employee   string     

Employee UUID Example: quia

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/3/epi-deliveries" \
    --header "Authorization: Bearer 5DPc3ge6b1dkZaV4fv6haE8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"b2bee0af-2d9c-397c-9fa0-6f933185fb93\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"lot\": \"Example Lot\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/3/epi-deliveries"
);

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

let body = {
    "epi_type_id": "b2bee0af-2d9c-397c-9fa0-6f933185fb93",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "lot": "Example Lot"
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer 5DPc3ge6b1dkZaV4fv6haE8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 3

employee   string     

Employee UUID Example: sint

Body Parameters

epi_type_id   string     

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: b2bee0af-2d9c-397c-9fa0-6f933185fb93

delivery_date   string     

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

quantity   integer  optional    

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

condition   string     

Condicao. Example: Example Condition

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

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

Create employee initial EPI kit

requires authentication employee-epi kit

Register multiple EPI deliveries as initial kit

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/qui/epi-deliveries/kit" \
    --header "Authorization: Bearer Dg8a3ae6Ec4d5hVPvbZf61k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delivery_date\": \"2024-01-01\",
    \"items\": [
        {
            \"epi_type_id\": \"a2d2c70a-c0d2-30fc-86f8-454fe390ad03\",
            \"quantity\": 1,
            \"condition\": \"Example Items * condition\",
            \"lot\": \"Example Items * lot\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/qui/epi-deliveries/kit"
);

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

let body = {
    "delivery_date": "2024-01-01",
    "items": [
        {
            "epi_type_id": "a2d2c70a-c0d2-30fc-86f8-454fe390ad03",
            "quantity": 1,
            "condition": "Example Items * condition",
            "lot": "Example Items * lot"
        },
        null
    ]
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer Dg8a3ae6Ec4d5hVPvbZf61k

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: qui

Body Parameters

delivery_date   string     

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

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: a2d2c70a-c0d2-30fc-86f8-454fe390ad03

quantity   integer  optional    

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

condition   string     

Condição. Example: Example Items * condition

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

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

Update employee EPI delivery

requires authentication employee-epi update

Update an EPI delivery for an employee

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employees/14/epi-deliveries/deserunt" \
    --header "Authorization: Bearer Eva1agb6Ze5dP86chVD3kf4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"epi_type_id\": \"953cfd79-4125-375b-ab51-9653556b0d2e\",
    \"delivery_date\": \"2024-01-01\",
    \"quantity\": 1,
    \"condition\": \"Example Condition\",
    \"lot\": \"Example Lot\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/14/epi-deliveries/deserunt"
);

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

let body = {
    "epi_type_id": "953cfd79-4125-375b-ab51-9653556b0d2e",
    "delivery_date": "2024-01-01",
    "quantity": 1,
    "condition": "Example Condition",
    "lot": "Example Lot"
};

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

Request      

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

Headers

Authorization        

Example: Bearer Eva1agb6Ze5dP86chVD3kf4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 14

id   string     

EPI delivery UUID Example: deserunt

employee   string     

Employee UUID Example: molestias

Body Parameters

epi_type_id   string  optional    

Tipo de EPI. The uuid of an existing record in the epi_types table. Example: 953cfd79-4125-375b-ab51-9653556b0d2e

delivery_date   string  optional    

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

quantity   integer  optional    

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

condition   string  optional    

Condição. Example: Example Condition

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

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

Delete employee EPI delivery

requires authentication employee-epi delete

Delete an EPI delivery from an employee

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

Employee UUID Example: similique

id   string     

EPI delivery UUID Example: expedita

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/9301ce6e-f94e-3cec-bed2-c681f8295ac5" \
    --header "Authorization: Bearer hV6451E6a3DbgkfvceZPda8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/9301ce6e-f94e-3cec-bed2-c681f8295ac5"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 9301ce6e-f94e-3cec-bed2-c681f8295ac5

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/d7cab441-a8c5-378f-ba59-07fae8457e7f/info" \
    --header "Authorization: Bearer VZ513ag4fcabh866kveEPDd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/d7cab441-a8c5-378f-ba59-07fae8457e7f/info"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: d7cab441-a8c5-378f-ba59-07fae8457e7f

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/6ae0849a-ee7a-3cac-a83e-319e76b44241/download" \
    --header "Authorization: Bearer 48k65ahaV6bgeEvZ3fdc1DP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/6ae0849a-ee7a-3cac-a83e-319e76b44241/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: 6ae0849a-ee7a-3cac-a83e-319e76b44241

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

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

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 6eDPdc6aZ38a54f1VvkgEbh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"aliquam\",
    \"supplier_id\": \"a\",
    \"work_id\": \"est\",
    \"start_date\": \"2026-07-23T09:28:48\",
    \"end_date\": \"2119-11-22\",
    \"per_page\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "q": "aliquam",
    "supplier_id": "a",
    "work_id": "est",
    "start_date": "2026-07-23T09:28:48",
    "end_date": "2119-11-22",
    "per_page": 1
};

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: aliquam

supplier_id   string  optional    

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

work_id   string  optional    

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

start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-07-23T09:28:48

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: 2119-11-22

per_page   integer  optional    

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

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

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

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

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 4Ek18afD6c5dV63abgvehPZ

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: dolor

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: exercitationem

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

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

let body = {
    "file": {
        "path": "quidem",
        "name": "ut",
        "extension": "eaque"
    }
};

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 bfV8eD616dEhPk4Zcvgaa35

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: occaecati

Body Parameters

file   object     
path   string     

Example: quidem

name   string     

Example: ut

extension   string     

Example: eaque

size   string  optional    

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: ut

Body Parameters

work_ids   string[]  optional    

The uuid of an existing record in the works table.

Import

Endpoints for managing NFe imports and product processing.

NFe Imports

Import and process Brazilian electronic invoice (NFe) files.

Create NFe Import

requires authentication imports store

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: dolorem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: vel

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: qui

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: voluptas

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

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

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

let body = {
    "sort_by": "sed",
    "sort_desc": true,
    "page": 52,
    "per_page": 14
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "harum suscipit",
            "abbreviation": "FA"
        },
        {
            "id": null,
            "name": "necessitatibus nulla",
            "abbreviation": "AJ"
        }
    ],
    "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 V86vcDEZh4efda1ga6bk3P5

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: sed

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

List cities by state

requires authentication No specific permission required

List all cities for a given state

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "West Clementineton"
        },
        {
            "id": null,
            "name": "Emilebury"
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer bkf1a6DV3E6Pdv54geZa8ch

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

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

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

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

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

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=fuga&document=quidem&work_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3&bank_account_id=a01edd80-bf3e-40f7-8613-ccb4be5831b3" \
    --header "Authorization: Bearer EeDV4d3a5bh168favk6ZcgP" \
    --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": "fuga",
    "document": "quidem",
    "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 EeDV4d3a5bh168favk6ZcgP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


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

Example response (200):


{
    "data": [
        {
            "id": "c49090a1-7141-3ab0-b982-d26b8efa6dab",
            "receipt_number": "REC-6653",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Mathilde Lehner Jr.",
                "document": "955.193.681-25"
            },
            "payment": {
                "amount": 2069.87,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Sunt quia corrupti pariatur ad."
            },
            "issuer": {
                "name": "Haag-Gorczany",
                "document": "57.647.075/7022-14"
            },
            "issue": {
                "date": "2026-07-16",
                "city": "West Clarissastad",
                "state": "RS"
            },
            "created_by": {
                "id": "a253d6fc-d2a4-438f-a1f0-b1bbf3df6969",
                "name": "Prof. Joe Champlin"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "1d8563d3-71c7-38e5-86d3-2764c1e3460e",
            "receipt_number": "REC-2865",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Dylan Grant",
                "document": "006.737.302-25"
            },
            "payment": {
                "amount": 6103.56,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Voluptas excepturi nesciunt earum maiores odit."
            },
            "issuer": {
                "name": "Mraz, Nikolaus and Hettinger",
                "document": "13.706.028/6023-39"
            },
            "issue": {
                "date": "2026-07-09",
                "city": "South Ocieborough",
                "state": "PE"
            },
            "created_by": {
                "id": "a253d6fc-d917-4e61-92af-1948c1a11536",
                "name": "Ms. Angie Hayes"
            },
            "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 EeDV4d3a5bh168favk6ZcgP

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

document   string  optional    

Example: quidem

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

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

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

let body = {
    "methods": [
        {
            "method": "bank_transfer",
            "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 kf6DgaVca4hE8P6vZd51b3e

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

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


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

Example response (200):


{
    "data": {
        "id": "b2d30d8d-59a4-35dc-9743-5cd0fef02b66",
        "receipt_number": "REC-9705",
        "receiver_type": "employee",
        "receiver": {
            "id": null,
            "name": "Carroll Mosciski",
            "document": "784.697.362-48"
        },
        "payment": {
            "amount": 8594.72,
            "amount_in_words": "Valor por extenso de teste",
            "method": "pix",
            "description": "Non voluptatem hic nisi illum id nam eos."
        },
        "issuer": {
            "name": "Rutherford-Lynch",
            "document": "58.378.819/9539-57"
        },
        "issue": {
            "date": "2026-06-28",
            "city": "Binsland",
            "state": "SP"
        },
        "created_by": {
            "id": "a253d6fc-f924-46bf-9c82-d97effc1f174",
            "name": "Joe Quitzon"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer 5P8ca1hkEb3v46ea6DZVfdg

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 8bvae1fadk4Z35EDPhc66Vg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"6d083d5b-1a49-4ffc-ab92-98801a786fad\",
    \"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\": \"4d05c12b-cc29-31ca-b7cb-e2b9afd4e22f\",
    \"bank_account_id\": \"176873df-bba4-38f3-b169-5c65373b5558\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "6d083d5b-1a49-4ffc-ab92-98801a786fad",
    "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": "4d05c12b-cc29-31ca-b7cb-e2b9afd4e22f",
    "bank_account_id": "176873df-bba4-38f3-b169-5c65373b5558"
};

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

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: 6d083d5b-1a49-4ffc-ab92-98801a786fad

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: 4d05c12b-cc29-31ca-b7cb-e2b9afd4e22f

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: 176873df-bba4-38f3-b169-5c65373b5558

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 1V6dfvZaaDbE8che456gP3k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"a92fde96-c3d0-4595-bcc4-22e038564a38\",
    \"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\": \"4b01c7e9-af40-319f-bc11-56e770ffca6d\",
    \"bank_account_id\": \"90e5568c-e419-37d4-9611-bd6214147862\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "a92fde96-c3d0-4595-bcc4-22e038564a38",
    "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": "4b01c7e9-af40-319f-bc11-56e770ffca6d",
    "bank_account_id": "90e5568c-e419-37d4-9611-bd6214147862"
};

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

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: a92fde96-c3d0-4595-bcc4-22e038564a38

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: 4b01c7e9-af40-319f-bc11-56e770ffca6d

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: 90e5568c-e419-37d4-9611-bd6214147862

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "f5f89179-63e4-39be-aa5b-5ae36ad34f33",
            "receipt_number": "REC-5243",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Dr. Cortez Harvey",
                "document": "628.517.715-99"
            },
            "payment": {
                "amount": 3601.99,
                "amount_in_words": "Valor por extenso de teste",
                "method": "check",
                "description": "Est officia nulla odit dicta expedita aspernatur praesentium."
            },
            "issuer": {
                "name": "Towne-Von",
                "document": "62.144.203/6482-33"
            },
            "issue": {
                "date": "2026-07-05",
                "city": "Gustport",
                "state": "MG"
            },
            "created_by": {
                "id": "a253d6fd-51c8-49f6-8051-4e69b2342bbe",
                "name": "Miss Ocie Willms"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "9d92ea0d-3fa1-3794-adca-00992064a77c",
            "receipt_number": "REC-1123",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Elizabeth Bergstrom",
                "document": "811.019.417-01"
            },
            "payment": {
                "amount": 9145.61,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Eum accusamus error magni in aut."
            },
            "issuer": {
                "name": "Schulist-Rice",
                "document": "85.418.054/2004-13"
            },
            "issue": {
                "date": "2026-07-06",
                "city": "Quitzonshire",
                "state": "RJ"
            },
            "created_by": {
                "id": "a253d6fd-5851-4858-a3b5-96e8c96a9da0",
                "name": "Gabriella Erdman IV"
            },
            "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 ac6kbfEhvg1364PaV8DdZ5e

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 13

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


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

Example response (200):


{
    "data": [
        {
            "id": "eb0b3c2f-89e9-3c14-96d5-a727e130bc3d",
            "name": "provident",
            "display_name": "Et asperiores repellat reprehenderit nam."
        },
        {
            "id": "7cf3b409-a6fa-3558-a9ba-04f2f1125f9b",
            "name": "ad",
            "display_name": "Velit neque voluptas reiciendis quos asperiores."
        }
    ],
    "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 516daZeDb8Ekacf64gV3vPh

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


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

Example response (200):


{
    "data": [
        {
            "id": "689d5a6f-207d-3216-b2fd-020a1f6c80ee",
            "name": "sit-tenetur-autem",
            "display_name": "sit mollitia a",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c609c3e3-1fa2-3bb8-86dc-64a38749b2c7",
            "name": "itaque-maxime-maiores",
            "display_name": "in voluptatem veniam",
            "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 Zvbfhdk6a1E5gP46ecV8Da3

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

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

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


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

Example response (200):


{
    "data": {
        "id": "d5f45f86-15da-3122-964a-147e002b6294",
        "name": "aperiam-aut-rerum",
        "display_name": "doloribus ut unde",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer Zd4kaE6Pe6vf5hDb3g18caV

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

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 a1ZkdVgDbavc854fh366PEe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"4c55dfe0-2d8a-381e-9405-ccaf536c9acd\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "4c55dfe0-2d8a-381e-9405-ccaf536c9acd"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "f265be45-3c61-31dc-af41-206f6fb39c47",
        "name": "harum-consequatur",
        "display_name": "perferendis enim suscipit",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer a1ZkdVgDbavc854fh366PEe

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 g5d4c6h1vD3afePkbaZ6E8V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"449bbc67-83fd-3438-b35f-a4323dce331c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/permission-groups/1/permissions"
);

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

let body = {
    "permissions": [
        "449bbc67-83fd-3438-b35f-a4323dce331c"
    ]
};

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

Example response (200):


{
    "data": {
        "id": "74c3f634-4a24-341e-97b6-79f03e9fd617",
        "name": "et-molestiae",
        "display_name": "ipsa eos quisquam",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer g5d4c6h1vD3afePkbaZ6E8V

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


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

Example response (200):


{
    "data": [
        {
            "id": "ede5e092-ecbf-3f95-bbaa-55be3069919a",
            "name": "Sra. Irene Galvão Marés",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ce349e08-eecd-311f-8c60-f6cd78b61470",
            "name": "Yohanna Mariana Cervantes Jr.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-brands

Headers

Authorization        

Example: Bearer D6bfg4Zd3veaVkaEP518h6c

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

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


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

Example response (200):


{
    "data": {
        "id": "b864d60c-979d-3abb-800f-8d4ef56b4592",
        "name": "Sr. Fernando Pereira Balestero",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer kZe5D8V6cP13gfEa6a4hdvb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: tempore

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 564DadaPhgvkb13ceVZE68f" \
    --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 564DadaPhgvkb13ceVZE68f",
    "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 564DadaPhgvkb13ceVZE68f

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/aspernatur" \
    --header "Authorization: Bearer 8Eva615a3VhDc4edgkZfPb6" \
    --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/aspernatur"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: aspernatur

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: deserunt

Product Families

Endpoints for product families

List product families

requires authentication product-family index

List all product families

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "e1e8e8ee-dc11-33eb-a205-dc82e4ae687d",
            "name": "Beatriz Serrano Jr.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4242de90-b82f-33ae-b887-6fc1a512b20c",
            "name": "David Verdugo Brito",
            "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 Pdvh8ec4b6k3ZD51aagf6VE

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: Structure

Show product family

requires authentication product-family show

Show a product family

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

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


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

Example response (200):


{
    "data": {
        "id": "662cf291-a99d-3457-a9cf-e401026f9684",
        "name": "Srta. Iasmin Alexa Aguiar Sobrinho",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer Pgca8kVa64fd3vh5EDbZ1e6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: aut

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

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

let body = {
    "name": "Example Name"
};

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

Example response (201):


{
    "message": "string"
}
 

Request      

POST api/product-families

Headers

Authorization        

Example: Bearer gVk5efha66dDE3Pav8bcZ41

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

Update product family

requires authentication product-family update

Update a product family

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

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

let body = {
    "name": "Example Name"
};

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

Example response (200):


{
    "message": "string"
}
 

Request      

PUT api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer bZh6kae4a6Dvf8dPV3g15Ec

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: quae

Body Parameters

name   string     

Nome. Example: Example Name

Delete product family

requires authentication product-family delete

Delete a product family

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: asperiores

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 ehkbfV83Pc1dE54gZv6D6aa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"c66fdfa3-faf0-3b2f-b550-20dc97018818\",
    \"user_id\": \"95bd888d-c545-303a-8e26-54e80e64ea5b\",
    \"responsible_id\": \"3b25137c-ae1e-323b-bb12-caa4648100e1\",
    \"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 ehkbfV83Pc1dE54gZv6D6aa",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "c66fdfa3-faf0-3b2f-b550-20dc97018818",
    "user_id": "95bd888d-c545-303a-8e26-54e80e64ea5b",
    "responsible_id": "3b25137c-ae1e-323b-bb12-caa4648100e1",
    "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": "0caa819c-4b2b-342d-9761-7feccabba163",
            "name": "Impedit incidunt qui exercitationem.",
            "description": null,
            "work": {
                "id": "a253d6fe-92d1-4073-8a4f-4cd47e4086af",
                "name": "Leonardo Ziraldo Ramires"
            },
            "user": {
                "id": "a253d6fe-95de-4589-a85b-850ac8824df6",
                "name": "Rosendo Gibson"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "091031e0-6d92-3b86-a877-c58549fd3082",
            "name": "Non iusto nihil aliquam.",
            "description": null,
            "work": {
                "id": "a253d6fe-9c18-4f54-aea4-f587a6692a20",
                "name": "Dr. Nero Duarte Dominato Sobrinho"
            },
            "user": {
                "id": "a253d6fe-9f47-456e-ae95-041b13c3261d",
                "name": "Marcelle Predovic"
            },
            "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 ehkbfV83Pc1dE54gZv6D6aa

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: c66fdfa3-faf0-3b2f-b550-20dc97018818

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 95bd888d-c545-303a-8e26-54e80e64ea5b

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 3b25137c-ae1e-323b-bb12-caa4648100e1

per_page   integer  optional    

Itens por página. O campo value deve ser pelo menos 1. O campo value não pode ser superior a 100. Example: 1

sort   string  optional    

Ordenação. Example: Example Sort

sort_desc   boolean  optional    

Ordem decrescente. Example: true

Show product quantity list

requires authentication product-quantity-list show

Show a product quantity list

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

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


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

Example response (200):


{
    "data": {
        "id": "be1eca1c-de1d-33e0-8416-93e31b20d10d",
        "name": "Est ipsa autem.",
        "description": "Eum dolor qui consequuntur occaecati quia aut voluptatem. Ratione sit ipsum eum hic repellendus quam. Enim voluptatem aut officiis est magni ab aliquam.",
        "work": {
            "id": "a253d6fe-a729-4731-929d-77f16bc8298d",
            "name": "Liz Beltrão Pedrosa Neto"
        },
        "user": {
            "id": "a253d6fe-aa6e-4c98-acca-e6e33f4091fb",
            "name": "Marjory Wolff MD"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer baPfd6Vga8hEkec3DZ1v564

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: ut

List items

requires authentication product-quantity-list show

List all items from a product quantity list with pagination

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/accusamus/items" \
    --header "Authorization: Bearer 4ZDvac86fgaV5Eb1de3h6kP" \
    --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/accusamus/items"
);

const headers = {
    "Authorization": "Bearer 4ZDvac86fgaV5Eb1de3h6kP",
    "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": "411473ff-e4eb-3788-9d74-fa9c6e89bab4",
            "product": {
                "id": "a253d6fe-c2ef-4bf8-81ee-dd3350dcf5b8",
                "name": "Sr. Walter Azevedo",
                "code": "PRD-281068",
                "unit": {
                    "id": "a253d6fe-c088-4c4b-84c5-54e2b1c8f509",
                    "name": "Estêvão Lutero",
                    "abbreviation": "Hortência Natália Lutero Neto"
                }
            },
            "quantity": 303.2187,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "2ae032e3-4f88-3db9-85c9-4b3822e68204",
            "product": {
                "id": "a253d6fe-d454-42bc-a2bd-5c6a4b1ac901",
                "name": "Dr. Demian Caldeira Soares",
                "code": "PRD-610452",
                "unit": {
                    "id": "a253d6fe-d356-4aee-9ea4-1bd3cbaf77d9",
                    "name": "Srta. Pâmela Dayana Marinho Neto",
                    "abbreviation": "Heloísa Serna Jr."
                }
            },
            "quantity": 812.518,
            "observation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 4ZDvac86fgaV5Eb1de3h6kP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: accusamus

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 1Z6aEchb5d3g4VkDv6aP8fe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"3b2bbcca-497f-3877-bb59-908fbec60056\",
    \"items\": [
        {
            \"product_id\": \"9a9620fe-db93-317e-be02-12186fa3ff08\",
            \"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 1Z6aEchb5d3g4VkDv6aP8fe",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "3b2bbcca-497f-3877-bb59-908fbec60056",
    "items": [
        {
            "product_id": "9a9620fe-db93-317e-be02-12186fa3ff08",
            "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 1Z6aEchb5d3g4VkDv6aP8fe

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: 3b2bbcca-497f-3877-bb59-908fbec60056

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 9a9620fe-db93-317e-be02-12186fa3ff08

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/quibusdam" \
    --header "Authorization: Bearer 6ha86v5dVe31PgbDEk4facZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"f193eb98-ef4c-36cd-99f0-8264fc9ba6d2\",
            \"product_id\": \"4d0c62b0-f7f9-308d-b1e6-8541c864cc70\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quibusdam"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "f193eb98-ef4c-36cd-99f0-8264fc9ba6d2",
            "product_id": "4d0c62b0-f7f9-308d-b1e6-8541c864cc70",
            "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 6ha86v5dVe31PgbDEk4facZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: quibusdam

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: f193eb98-ef4c-36cd-99f0-8264fc9ba6d2

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 4d0c62b0-f7f9-308d-b1e6-8541c864cc70

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: sit

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/sed/items" \
    --header "Authorization: Bearer Vf4gkDh5cZ68e6a13vEadbP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"58a43940-c8d4-3c56-9e1b-0f52cd99cfed\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/sed/items"
);

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

let body = {
    "items": [
        {
            "product_id": "58a43940-c8d4-3c56-9e1b-0f52cd99cfed",
            "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 Vf4gkDh5cZ68e6a13vEadbP

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: sed

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: 58a43940-c8d4-3c56-9e1b-0f52cd99cfed

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/itaque" \
    --header "Authorization: Bearer 5hbPZ614e6vfcE83dgkaVDa" \
    --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/itaque"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: itaque

item   string     

Product Quantity List Item UUID Example: voluptatem

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/rerum/items" \
    --header "Authorization: Bearer dagDh4PVvbZkeEa63fc8516" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"8f05643e-f950-3674-926f-f7f7184728e6\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/rerum/items"
);

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

let body = {
    "items": [
        "8f05643e-f950-3674-926f-f7f7184728e6"
    ]
};

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 dagDh4PVvbZkeEa63fc8516

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: rerum

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/alias/sync-items" \
    --header "Authorization: Bearer 46V3516fZdDP8Eaahgkvebc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"83d7520d-5644-3fc3-a827-0be83947a6ed\",
            \"product_id\": \"eedefd23-eea4-309c-ac5d-86dd942ff2d7\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/alias/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "83d7520d-5644-3fc3-a827-0be83947a6ed",
            "product_id": "eedefd23-eea4-309c-ac5d-86dd942ff2d7",
            "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 46V3516fZdDP8Eaahgkvebc

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: alias

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: 83d7520d-5644-3fc3-a827-0be83947a6ed

product_id   string     

Produto. The uuid of an existing record in the products table. Example: eedefd23-eea4-309c-ac5d-86dd942ff2d7

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/et/fulfill" \
    --header "Authorization: Bearer ZVvkPD3Ega6fc4ahde1586b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"94dd52f1-d800-3d5a-9192-02eadab110e6\",
    \"quantity\": 1,
    \"source_stock_id\": \"b493e06c-5bb8-3711-9e2e-9f058ab52b4b\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"daecf810-7cf4-33c9-b9b0-bab1a0cc0e2d\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/et/fulfill"
);

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

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "94dd52f1-d800-3d5a-9192-02eadab110e6",
    "quantity": 1,
    "source_stock_id": "b493e06c-5bb8-3711-9e2e-9f058ab52b4b",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "daecf810-7cf4-33c9-b9b0-bab1a0cc0e2d",
            "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 ZVvkPD3Ega6fc4ahde1586b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: et

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: 94dd52f1-d800-3d5a-9192-02eadab110e6

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: b493e06c-5bb8-3711-9e2e-9f058ab52b4b

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: daecf810-7cf4-33c9-b9b0-bab1a0cc0e2d

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

const headers = {
    "Authorization": "Bearer D86c1kdV43PEaZgvbe5f6ha",
    "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": "ef79b6d8-8476-38d6-8b0c-5c3953c5fff7",
            "quantity": 48.4401,
            "fulfilled_at": "2026-07-02T09:26:28.000000Z",
            "created_at": null
        },
        {
            "id": "9dd3dd42-393b-31e8-8eb7-ef528a42779d",
            "quantity": 12.6203,
            "fulfilled_at": "2026-07-03T19:54:42.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 D86c1kdV43PEaZgvbe5f6ha

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: ut

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

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


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

Example response (200):


{
    "data": {
        "id": "2cabedec-ac8e-35a7-9263-c399b51d2fa2",
        "product": {
            "id": "a253d702-7bb1-490d-a41b-8f87a445898f",
            "name": "Sr. Gustavo Fonseca Sobrinho",
            "code": "PRD-815940",
            "unit": {
                "id": "a253d702-7a86-4acd-86ec-b66ef9ef1362",
                "name": "Dr. Sandra Maya Quintana Jr.",
                "abbreviation": "Mauro Mauro Martines"
            }
        },
        "quantity": 45.2314,
        "quantity_fulfilled": 0,
        "quantity_pending": 45.2314,
        "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 46h6PDEeVb3dagaZ1cv8fk5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: illo

item   string     

Product Request Item UUID Example: a

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/vero/pending-items" \
    --header "Authorization: Bearer 3gD6aZ8h54kfdEavV6P1ecb" \
    --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/vero/pending-items"
);

const headers = {
    "Authorization": "Bearer 3gD6aZ8h54kfdEavV6P1ecb",
    "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": "a0cb1e62-05a1-30e0-a097-aae8c4fb0100",
            "product": {
                "id": "a253d702-9439-44a8-9c9f-e1bd20c6c251",
                "name": "Roberta Garcia Mendonça",
                "code": "PRD-769424",
                "unit": {
                    "id": "a253d702-9308-4f2a-94c2-ac9e32ec9596",
                    "name": "Sr. Ronaldo Andres Ferreira",
                    "abbreviation": "Joaquim Marin"
                }
            },
            "quantity": 511.4423,
            "quantity_fulfilled": 0,
            "quantity_pending": 511.4423,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "5cd9c9fb-0e95-380b-aa36-bdde8777d728",
            "product": {
                "id": "a253d702-a3e4-4e39-b2b6-bac692db9a5a",
                "name": "Srta. Betina Aragão Ferreira",
                "code": "PRD-178407",
                "unit": {
                    "id": "a253d702-a2cc-4519-8b68-8acb73e9989e",
                    "name": "Anderson Inácio Saraiva Filho",
                    "abbreviation": "Sr. Gabriel Barreto"
                }
            },
            "quantity": 382.3963,
            "quantity_fulfilled": 0,
            "quantity_pending": 382.3963,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests/{productRequest}/pending-items

Headers

Authorization        

Example: Bearer 3gD6aZ8h54kfdEavV6P1ecb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: vero

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "8bf116c5-ba6b-3388-a9ee-63607623193e",
            "product": {
                "id": "a253d702-b7cb-4962-b233-63860350d50d",
                "name": "Sr. Heitor da Silva Gomes",
                "code": "PRD-272264",
                "unit": {
                    "id": "a253d702-b65c-487c-83d0-3ddae1de4835",
                    "name": "Carla Santana Caldeira",
                    "abbreviation": "Sra. Juliana Ferraz D'ávila Sobrinho"
                }
            },
            "quantity": 623.6933,
            "quantity_fulfilled": 0,
            "quantity_pending": 623.6933,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "64f2c224-fc74-3cfd-bb07-afa3ee6f64de",
            "product": {
                "id": "a253d702-c7fb-47d0-8b02-b9726199b461",
                "name": "Emilly Mila Fernandes Jr.",
                "code": "PRD-326282",
                "unit": {
                    "id": "a253d702-c6d1-4e72-8d10-aa37c3941064",
                    "name": "Roberto Barros Filho",
                    "abbreviation": "Dr. Tábata Carla Ortiz Jr."
                }
            },
            "quantity": 315.8064,
            "quantity_fulfilled": 0,
            "quantity_pending": 315.8064,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Commodi totam adipisci id qui beatae et.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer h53eb48kvdPZ166cfEaDagV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: molestiae

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 Za8D4PcV3v6k1febd5g6Eah" \
    --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\": \"c41ec42b-0cce-3bfb-bcf7-145383b3b5be\",
    \"work_location_id\": \"1a5bcb9f-ddca-37cb-a8df-14f80e4cd7ee\",
    \"user_id\": \"f6f1bacc-bbc2-31ae-a6f0-dad5858aa57c\",
    \"status_id\": \"26024725-b3f5-3d67-bb1d-6848ae872ab3\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"ab00e2b4-22da-3f2b-9206-01dda1ef991c\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer Za8D4PcV3v6k1febd5g6Eah",
    "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": "c41ec42b-0cce-3bfb-bcf7-145383b3b5be",
    "work_location_id": "1a5bcb9f-ddca-37cb-a8df-14f80e4cd7ee",
    "user_id": "f6f1bacc-bbc2-31ae-a6f0-dad5858aa57c",
    "status_id": "26024725-b3f5-3d67-bb1d-6848ae872ab3",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "ab00e2b4-22da-3f2b-9206-01dda1ef991c"
};

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

Example response (200):


{
    "data": [
        {
            "id": "91ee8de3-bb4f-3e0d-b102-4160b25300ea",
            "code": null,
            "name": "In omnis rerum.",
            "description": "Et non autem sint. Aspernatur eum sapiente minus et veritatis atque maiores. Blanditiis earum inventore sit aliquid rem. Molestias ducimus et dolor animi et nihil.",
            "work": {
                "id": "a253d6ff-dc75-44db-adba-7a78f4535351",
                "name": "Sr. Fábio Amaral Jr."
            },
            "user": {
                "id": "a253d6ff-e046-48d8-b515-3ff4d9b8395a",
                "name": "Irving Wisoky"
            },
            "status": {
                "id": "a253d6ff-e229-4dcd-b34f-9b77e61131d5",
                "slug": null,
                "name": null,
                "description": "Dr. Camila Eloá Pontes Sobrinho",
                "abbreviation": "cumque",
                "color": "#ee5b19",
                "text_color": "#24523e"
            },
            "priority": "urgent",
            "priority_label": "Urgente",
            "needed_at": null,
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b33985e3-aa7a-36a3-892d-b6d96c1d8dee",
            "code": null,
            "name": "Eaque sint eaque.",
            "description": "Provident modi aspernatur pariatur iusto. Veritatis eos aut atque.",
            "work": {
                "id": "a253d6ff-e561-4c85-a8b3-52df42233a60",
                "name": "Kevin da Rosa Filho"
            },
            "user": {
                "id": "a253d6ff-e865-4033-b1d5-e9dce9a2102e",
                "name": "Dr. Eric Connelly"
            },
            "status": {
                "id": "a253d6ff-ea77-4bbb-9103-e465adcb9c21",
                "slug": null,
                "name": null,
                "description": "Srta. Daniella Vieira",
                "abbreviation": "reiciendis",
                "color": "#51bebf",
                "text_color": "#a27507"
            },
            "priority": "high",
            "priority_label": "Alta",
            "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 Za8D4PcV3v6k1febd5g6Eah

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: c41ec42b-0cce-3bfb-bcf7-145383b3b5be

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 1a5bcb9f-ddca-37cb-a8df-14f80e4cd7ee

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: f6f1bacc-bbc2-31ae-a6f0-dad5858aa57c

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 26024725-b3f5-3d67-bb1d-6848ae872ab3

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: ab00e2b4-22da-3f2b-9206-01dda1ef991c

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

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


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

Example response (200):


{
    "data": {
        "id": "b447c3e5-1aff-38c1-83c6-1eb53437bc89",
        "code": null,
        "name": "Nobis aut exercitationem provident corrupti.",
        "description": null,
        "work": {
            "id": "a253d6ff-f3eb-4b9d-a00d-8692018e4e5d",
            "name": "Dr. Alma Leal"
        },
        "user": {
            "id": "a253d6ff-f73b-4700-94d5-60baa1b662fc",
            "name": "Francis Bartell II"
        },
        "status": {
            "id": "a253d6ff-f960-4b3a-bd85-bcc007aa80fc",
            "slug": null,
            "name": null,
            "description": "Dr. Heloísa Ortega Domingues",
            "abbreviation": "quas",
            "color": "#f4443c",
            "text_color": "#000c9d"
        },
        "priority": "urgent",
        "priority_label": "Urgente",
        "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 PD6gb4a351kVZcd6vEaef8h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: et

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

const headers = {
    "Authorization": "Bearer EhP1eVg6vcdaDkf4b36aZ85",
    "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": "f6eb01e6-fd44-30da-b31c-baf128e14fa5",
            "product": {
                "id": "a253d700-1635-4594-883f-bedf47d2f500",
                "name": "Srta. Daniela Domingues Mascarenhas",
                "code": "PRD-188467",
                "unit": {
                    "id": "a253d700-1503-4fd5-8618-20f8714543e1",
                    "name": "Agatha Dirce Correia Filho",
                    "abbreviation": "Dante Ítalo Beltrão"
                }
            },
            "quantity": 851.9426,
            "quantity_fulfilled": 0,
            "quantity_pending": 851.9426,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Ab voluptatem sequi dolor.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "da1c2e2c-771a-357c-a352-2e0978fb04f3",
            "product": {
                "id": "a253d700-28d2-4ed1-b6ec-0f2697b7ae59",
                "name": "Sr. Márcio James Brito Jr.",
                "code": "PRD-252272",
                "unit": {
                    "id": "a253d700-27b6-4180-a03a-ca0638b02009",
                    "name": "Srta. Jasmin Fernandes Verdara Sobrinho",
                    "abbreviation": "Srta. Liz de Freitas"
                }
            },
            "quantity": 69.3166,
            "quantity_fulfilled": 0,
            "quantity_pending": 69.3166,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer EhP1eVg6vcdaDkf4b36aZ85

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: quam

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 dvVk81ba6fa3gEec64D5ZhP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"08b6c6b9-32c5-3c3e-bf6a-be50bf3382f9\",
    \"work_location_id\": \"a5b42ead-5c48-312c-8739-727953fa2853\",
    \"status_id\": \"0ea40394-ba3f-31ea-b125-40a206c956b1\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"994b1450-4c86-3602-a419-e6c9c240618f\",
            \"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 dvVk81ba6fa3gEec64D5ZhP",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "08b6c6b9-32c5-3c3e-bf6a-be50bf3382f9",
    "work_location_id": "a5b42ead-5c48-312c-8739-727953fa2853",
    "status_id": "0ea40394-ba3f-31ea-b125-40a206c956b1",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "994b1450-4c86-3602-a419-e6c9c240618f",
            "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 dvVk81ba6fa3gEec64D5ZhP

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: 08b6c6b9-32c5-3c3e-bf6a-be50bf3382f9

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: a5b42ead-5c48-312c-8739-727953fa2853

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 0ea40394-ba3f-31ea-b125-40a206c956b1

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: 994b1450-4c86-3602-a419-e6c9c240618f

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/commodi" \
    --header "Authorization: Bearer dkhZ56agf4Vv38E1caDeP6b" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"f4ee6bf3-4c4a-3f9d-8729-61b0ba3d7791\",
    \"work_location_id\": \"069d2228-7b0d-33fa-859b-ef53beb167e4\",
    \"status_id\": \"0afc39a0-591f-3ac1-9f1e-ab72e9c2e977\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"809bd1cd-0c93-3783-8fe2-5a7a3eb98c8b\",
            \"product_id\": \"e40a88b9-ee5e-3a8c-9df0-6fdb90f59b83\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/commodi"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "f4ee6bf3-4c4a-3f9d-8729-61b0ba3d7791",
    "work_location_id": "069d2228-7b0d-33fa-859b-ef53beb167e4",
    "status_id": "0afc39a0-591f-3ac1-9f1e-ab72e9c2e977",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "809bd1cd-0c93-3783-8fe2-5a7a3eb98c8b",
            "product_id": "e40a88b9-ee5e-3a8c-9df0-6fdb90f59b83",
            "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 dkhZ56agf4Vv38E1caDeP6b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: commodi

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: f4ee6bf3-4c4a-3f9d-8729-61b0ba3d7791

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 069d2228-7b0d-33fa-859b-ef53beb167e4

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 0afc39a0-591f-3ac1-9f1e-ab72e9c2e977

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: 809bd1cd-0c93-3783-8fe2-5a7a3eb98c8b

product_id   string     

Produto. The uuid of an existing record in the products table. Example: e40a88b9-ee5e-3a8c-9df0-6fdb90f59b83

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: cumque

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: qui

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/corrupti/reject" \
    --header "Authorization: Bearer 1P4D536c6gkZhVd8bEvfeaa" \
    --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/corrupti/reject"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: corrupti

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/incidunt/items" \
    --header "Authorization: Bearer Dgkv1edbh83aPE6c4a6Z5Vf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"af59e264-4466-3e54-a88a-fb247c2926b2\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/incidunt/items"
);

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

let body = {
    "items": [
        {
            "product_id": "af59e264-4466-3e54-a88a-fb247c2926b2",
            "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 Dgkv1edbh83aPE6c4a6Z5Vf

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: incidunt

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: af59e264-4466-3e54-a88a-fb247c2926b2

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/tempora" \
    --header "Authorization: Bearer 3Vv16acbdDekP6aZE5hg8f4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"f28017e9-95e2-3b7d-a9f0-f59e9086355d\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/tempora"
);

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

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "f28017e9-95e2-3b7d-a9f0-f59e9086355d"
};

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: tempora

item   string     

Product Request Item UUID Example: doloribus

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: f28017e9-95e2-3b7d-a9f0-f59e9086355d

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/neque/items" \
    --header "Authorization: Bearer Dh46b5af3egZEdP8kcV1v6a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"3cefde7e-77cf-3636-84ba-d8c6d9c36239\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/neque/items"
);

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

let body = {
    "items": [
        "3cefde7e-77cf-3636-84ba-d8c6d9c36239"
    ]
};

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 Dh46b5af3egZEdP8kcV1v6a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: neque

Body Parameters

items   string[]     

Item. The uuid of an existing record in the product_request_items table.

Sync items

requires authentication product-request update

Replace all items in the request

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/product-requests/ut/sync-items" \
    --header "Authorization: Bearer Ev3aVb1f86dgD4Z6P5kache" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"e0e84395-fd13-3496-aa0b-9632fc844501\",
            \"product_id\": \"2e13d6cd-7093-3057-845a-8058bae38dfe\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/ut/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "e0e84395-fd13-3496-aa0b-9632fc844501",
            "product_id": "2e13d6cd-7093-3057-845a-8058bae38dfe",
            "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 Ev3aVb1f86dgD4Z6P5kache

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: ut

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: e0e84395-fd13-3496-aa0b-9632fc844501

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 2e13d6cd-7093-3057-845a-8058bae38dfe

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


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

Example response (200):


{
    "data": [
        {
            "id": "fe9e8521-6080-3bef-b71b-0db444d7b2d7",
            "name": "Tatiane Duarte Medina Jr.",
            "code": "PRD-517736",
            "stock": 12259,
            "product_family": {
                "id": "a253d6fd-c507-4fb3-9d8a-ec1c893111a7",
                "name": "Fabrício Balestero Alcantara"
            },
            "product_brand": {
                "id": "a253d6fd-ca5c-480e-b8c4-73082b9d2195",
                "name": "Esther Liz Brito Filho"
            },
            "unit": {
                "id": "a253d6fd-d118-4154-a3f6-3b9b0a1526ea",
                "name": "Dr. Marília Amaral Ramos Sobrinho",
                "abbreviation": "Srta. Gisele Vasques"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Rem voluptatem sint voluptatum odio et ratione.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "94e9b4b7-32af-3086-bc7c-39210b67872b",
            "name": "Fabiana Faria",
            "code": "PRD-621801",
            "stock": 229341553,
            "product_family": {
                "id": "a253d6fd-daca-4aac-ae6d-8cf1bc9041d4",
                "name": "Alice Lidiane Ortega Filho"
            },
            "product_brand": {
                "id": "a253d6fd-df92-4e0e-b77c-9c9c80ad1edf",
                "name": "Srta. Sophie Ramires Serna"
            },
            "unit": {
                "id": "a253d6fd-e483-473d-a22c-9d3a5cf5c512",
                "name": "Dr. Manuel Rico Duarte",
                "abbreviation": "Daiana Urias Carvalho"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Eius autem molestias magnam quis reprehenderit.",
            "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 fkv6458bh6Dge3a1VdZPcaE

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


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

Example response (200):


{
    "data": {
        "id": "581f7847-014f-3bbe-9c32-a6321ee3ad78",
        "name": "Maya Romero",
        "code": "PRD-757252",
        "stock": 29,
        "product_family": {
            "id": "a253d6fd-f809-451c-9d84-fbf69bc08c7d",
            "name": "Srta. Catarina Karen das Dores Jr."
        },
        "product_brand": {
            "id": "a253d6fd-fbab-4394-bf3a-79f1f118eddc",
            "name": "Dr. Yohanna Rico"
        },
        "unit": {
            "id": "a253d6fd-ff50-4e68-8166-6e8b9141a6b6",
            "name": "César Adriel Jimenes",
            "abbreviation": "Srta. Pâmela Alcantara"
        },
        "image": {
            "id": null,
            "url": null
        },
        "description": "Dignissimos quos earum deleniti quos quibusdam.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer 6PvaZ614cafDEebg8V3k5hd

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: dolor

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 aaDb1v8kcZ4Pgd6536EVhef" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"27b7e729-5113-3407-bd8f-c21bd7ffbd8a\",
    \"product_brand_id\": \"4848fce9-3715-3d49-993e-e30530467769\",
    \"unit_id\": \"79a6d0b0-8120-3029-83fe-658d4c7f09b4\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "27b7e729-5113-3407-bd8f-c21bd7ffbd8a",
    "product_brand_id": "4848fce9-3715-3d49-993e-e30530467769",
    "unit_id": "79a6d0b0-8120-3029-83fe-658d4c7f09b4",
    "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 aaDb1v8kcZ4Pgd6536EVhef

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: 27b7e729-5113-3407-bd8f-c21bd7ffbd8a

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 4848fce9-3715-3d49-993e-e30530467769

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: 79a6d0b0-8120-3029-83fe-658d4c7f09b4

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 PEbkg8V1evaDZa45df63c6h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"90b8231e-6f3a-3e8f-8bce-30d2839aca03\",
    \"product_brand_id\": \"297615bb-ae77-3aa1-93f2-8ebeeca06d67\",
    \"unit_id\": \"180b3305-6ee7-3c6a-8f75-1e0a9088ad5f\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "90b8231e-6f3a-3e8f-8bce-30d2839aca03",
    "product_brand_id": "297615bb-ae77-3aa1-93f2-8ebeeca06d67",
    "unit_id": "180b3305-6ee7-3c6a-8f75-1e0a9088ad5f",
    "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 PEbkg8V1evaDZa45df63c6h

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

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: 90b8231e-6f3a-3e8f-8bce-30d2839aca03

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 297615bb-ae77-3aa1-93f2-8ebeeca06d67

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: 180b3305-6ee7-3c6a-8f75-1e0a9088ad5f

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: repudiandae

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/b7156b5c-fa2d-34cd-b4c2-a531ca3e9159/versions" \
    --header "Authorization: Bearer P1Zgkv38VdbfE5ae64acDh6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notes\": \"Example Notes\",
    \"responsible_user_id\": \"900f46c7-48bb-3671-b109-38f8fffbe5ee\",
    \"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/b7156b5c-fa2d-34cd-b4c2-a531ca3e9159/versions"
);

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

let body = {
    "notes": "Example Notes",
    "responsible_user_id": "900f46c7-48bb-3671-b109-38f8fffbe5ee",
    "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 P1Zgkv38VdbfE5ae64acDh6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: b7156b5c-fa2d-34cd-b4c2-a531ca3e9159

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: 900f46c7-48bb-3671-b109-38f8fffbe5ee

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/34305be0-2824-3b20-a213-8bf149893f7d/versions" \
    --header "Authorization: Bearer fv58a6kEDbdhcV16Zega43P" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/34305be0-2824-3b20-a213-8bf149893f7d/versions"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

projectUuid   string     

Project UUID Example: 34305be0-2824-3b20-a213-8bf149893f7d

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/86f83362-dd3c-3745-b06a-5d343c0ea9f8" \
    --header "Authorization: Bearer k4Pbv3eZfaDhEd6Vc615ag8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/86f83362-dd3c-3745-b06a-5d343c0ea9f8"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 86f83362-dd3c-3745-b06a-5d343c0ea9f8

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/327e7ac2-674a-3800-bc8c-1ed53dd56e84/download" \
    --header "Authorization: Bearer Zav16f35V8h4gkaEbcdPDe6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/327e7ac2-674a-3800-bc8c-1ed53dd56e84/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 327e7ac2-674a-3800-bc8c-1ed53dd56e84

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/7316f4e8-a176-33ab-9e62-6330efd3686c/restore" \
    --header "Authorization: Bearer a3k1VPdev8fh4a6bg56DcEZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/7316f4e8-a176-33ab-9e62-6330efd3686c/restore"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: 7316f4e8-a176-33ab-9e62-6330efd3686c

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/a6f0075f-e540-3e76-bad2-8741ab24a064" \
    --header "Authorization: Bearer 568PdEkaDb3f1vVZ4haec6g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/project-versions/a6f0075f-e540-3e76-bad2-8741ab24a064"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

versionUuid   string     

Revision UUID Example: a6f0075f-e540-3e76-bad2-8741ab24a064

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=6c0f423d-f065-375d-9d86-02ce7fa4f57d&work_id=1756fa0a-df15-3aa0-afc7-b6b4b7aab3da&status_id=ed27ef66-2e19-3dd2-85a9-bf8ba7c6f903&responsible_id=25f556cb-e014-3511-a1a8-09283fdd240a" \
    --header "Authorization: Bearer 1e4cZ6k3a6g8VEhv5aDbdPf" \
    --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": "6c0f423d-f065-375d-9d86-02ce7fa4f57d",
    "work_id": "1756fa0a-df15-3aa0-afc7-b6b4b7aab3da",
    "status_id": "ed27ef66-2e19-3dd2-85a9-bf8ba7c6f903",
    "responsible_id": "25f556cb-e014-3511-a1a8-09283fdd240a",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "79a0df4b-ba2b-3b69-a44d-b0c30e09057a",
            "name": "Nihil molestiae sunt",
            "description": "Nisi non repudiandae at ipsum tempora corrupti.",
            "current_version": 1,
            "file": {
                "path": "projects/cf5de44d-b6e6-3be5-b665-3509799620b6.pdf",
                "size": "1346668",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a253d702-da0f-4ce4-9473-12ea974203f6",
                "name": "Ab",
                "code": "EXB"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "cb313edb-8c40-34d5-8052-5cd4cd9aa637",
            "name": "Consequuntur dolores amet",
            "description": "Veniam ut et aut quidem et sint.",
            "current_version": 1,
            "file": {
                "path": "projects/88ec0d97-4687-36b7-b0b0-e9914c180c26.pdf",
                "size": "3175065",
                "extension": "pdf"
            },
            "discipline": {
                "id": "a253d702-ddbd-4e69-b00c-5c90e0fba58e",
                "name": "Enim",
                "code": "WVL"
            },
            "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 1e4cZ6k3a6g8VEhv5aDbdPf

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: 6c0f423d-f065-375d-9d86-02ce7fa4f57d

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: 1756fa0a-df15-3aa0-afc7-b6b4b7aab3da

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: ed27ef66-2e19-3dd2-85a9-bf8ba7c6f903

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: 25f556cb-e014-3511-a1a8-09283fdd240a

Show project

requires authentication project show

Show a project

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

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


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

Example response (200):


{
    "data": {
        "id": "ff26d9b0-614e-3282-a54e-e0d574f046b8",
        "name": "Accusantium labore eius",
        "description": "Voluptas porro labore molestiae possimus quis.",
        "current_version": 1,
        "file": {
            "path": "projects/aa632c6f-64a8-37ce-b4c2-b914758bb24b.pdf",
            "size": "2478073",
            "extension": "pdf"
        },
        "discipline": {
            "id": "a253d702-e5f9-4471-867a-45f0bc18a1c1",
            "name": "Est",
            "code": "LTF"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/projects/{id}

Headers

Authorization        

Example: Bearer cgv6k8bEd4aPDeZV16h3fa5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 4

project   string     

Project UUID Example: aut

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 V46f58abvha1e3EgDcPkd6Z" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"516da623-007d-317e-9951-e7dd1b5a31a0\",
    \"work_id\": \"3e8d6af5-73aa-3dec-a822-4fd7a4e045ef\",
    \"responsible_user_id\": \"2a63a10c-7299-307d-b790-077515912150\",
    \"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 V46f58abvha1e3EgDcPkd6Z",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "516da623-007d-317e-9951-e7dd1b5a31a0",
    "work_id": "3e8d6af5-73aa-3dec-a822-4fd7a4e045ef",
    "responsible_user_id": "2a63a10c-7299-307d-b790-077515912150",
    "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 V46f58abvha1e3EgDcPkd6Z

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: 516da623-007d-317e-9951-e7dd1b5a31a0

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: 3e8d6af5-73aa-3dec-a822-4fd7a4e045ef

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: 2a63a10c-7299-307d-b790-077515912150

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/18" \
    --header "Authorization: Bearer Ef3d6ek56DPgZhac1bVa4v8" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"discipline_id\": \"07791e76-953f-3926-ae40-fe5bf6df7c12\",
    \"work_id\": \"58aa0e8f-774c-39d9-b975-ceb85d7c3e75\",
    \"responsible_user_id\": \"b8c2d393-5708-38df-9711-bee8a6723525\",
    \"status_id\": \"6e971393-0d16-33a8-84a1-d77c44b38729\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/projects/18"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "discipline_id": "07791e76-953f-3926-ae40-fe5bf6df7c12",
    "work_id": "58aa0e8f-774c-39d9-b975-ceb85d7c3e75",
    "responsible_user_id": "b8c2d393-5708-38df-9711-bee8a6723525",
    "status_id": "6e971393-0d16-33a8-84a1-d77c44b38729"
};

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 Ef3d6ek56DPgZhac1bVa4v8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the project. Example: 18

project   string     

Project UUID Example: nemo

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: 07791e76-953f-3926-ae40-fe5bf6df7c12

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: 58aa0e8f-774c-39d9-b975-ceb85d7c3e75

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: b8c2d393-5708-38df-9711-bee8a6723525

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: 6e971393-0d16-33a8-84a1-d77c44b38729

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

project   string     

Project UUID Example: adipisci

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 f81b3cPk6gaE6daDhV4v5Ze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"daily_log\": \"quos\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/reports/daily-log"
);

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

let body = {
    "daily_log": "quos"
};

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 f81b3cPk6gaE6daDhV4v5Ze

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

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=facere&type=entrada&description=Sit+qui+sint+ut+beatae+dicta+dolorem+amet.&categories[]=3de7af3a-cb50-3269-a8aa-fe748a4f896e&exclude_categories[]=cf3cf143-2cbe-32e3-b4f3-2fe540185400&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=f140955b-8552-31d9-af40-e00adf0e3329&customers[]=0b4b790c-9508-3e57-8b9c-cd76227130fb&suppliers[]=6c5399a8-54f8-3cd8-9434-75c4bbe0bbdd&cash_session=18043fd1-46ec-3730-b90f-5a45711d1d62&works[]=79ba298e-22bb-36c4-9aeb-ca689cbac06d" \
    --header "Authorization: Bearer f4cDgZdbh36e8aaV61PE5vk" \
    --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": "facere",
    "type": "entrada",
    "description": "Sit qui sint ut beatae dicta dolorem amet.",
    "categories[0]": "3de7af3a-cb50-3269-a8aa-fe748a4f896e",
    "exclude_categories[0]": "cf3cf143-2cbe-32e3-b4f3-2fe540185400",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "f140955b-8552-31d9-af40-e00adf0e3329",
    "customers[0]": "0b4b790c-9508-3e57-8b9c-cd76227130fb",
    "suppliers[0]": "6c5399a8-54f8-3cd8-9434-75c4bbe0bbdd",
    "cash_session": "18043fd1-46ec-3730-b90f-5a45711d1d62",
    "works[0]": "79ba298e-22bb-36c4-9aeb-ca689cbac06d",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: facere

type   string  optional    

Tipo de lançamento. Example: entrada

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

Example: Sit qui sint ut beatae dicta dolorem amet.

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: 18043fd1-46ec-3730-b90f-5a45711d1d62

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=quam&type=entrada&description=Voluptatibus+voluptatum+animi+officiis.&categories[]=2263dea2-8f25-3bba-9619-c8c0347827a5&exclude_categories[]=7d514471-e71f-3653-8d3d-9c7ff4a6890f&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=9093d2c2-3cc8-3379-978f-ec7df5c201de&customers[]=67c3cfaa-aa43-3d38-bd65-02ce2340178e&suppliers[]=d46c795e-2198-3e53-9240-7970e300073c&cash_session=fe5541f2-0da8-318d-9578-cbd04617244e&works[]=0424efa7-753b-3ad5-8d8b-bc4f30dd7e07" \
    --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": "quam",
    "type": "entrada",
    "description": "Voluptatibus voluptatum animi officiis.",
    "categories[0]": "2263dea2-8f25-3bba-9619-c8c0347827a5",
    "exclude_categories[0]": "7d514471-e71f-3653-8d3d-9c7ff4a6890f",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "9093d2c2-3cc8-3379-978f-ec7df5c201de",
    "customers[0]": "67c3cfaa-aa43-3d38-bd65-02ce2340178e",
    "suppliers[0]": "d46c795e-2198-3e53-9240-7970e300073c",
    "cash_session": "fe5541f2-0da8-318d-9578-cbd04617244e",
    "works[0]": "0424efa7-753b-3ad5-8d8b-bc4f30dd7e07",
};
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: quam

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: Voluptatibus voluptatum animi officiis.

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: fe5541f2-0da8-318d-9578-cbd04617244e

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "6ba7dce2-801f-3a2f-a005-400d21fdebf2",
            "name": "ut qui",
            "slug": null,
            "description": "Ut voluptates laudantium incidunt illo quisquam et facilis. Temporibus beatae id laborum soluta. Temporibus dolores corporis cumque reiciendis ea autem quisquam.",
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4450e821-402e-3ac0-a633-c95fadcbe380",
            "name": "eos aperiam",
            "slug": null,
            "description": "Ullam fuga quia sapiente quas. Natus quisquam repellendus non nesciunt iure illum provident. Et aliquid vero ea voluptatibus laborum quia eveniet.",
            "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 kg3e6b1fvcaD86hEaZdP5V4

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

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

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


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

Example response (200):


{
    "data": {
        "id": "fd970eba-1141-301f-98ce-ad15044dcab0",
        "name": "et velit",
        "slug": null,
        "description": null,
        "abbreviation": "tpp",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer 46a651ePcv8abEf3dhDgkZV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 14

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 9

sector   string     

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

Body Parameters

name   string  optional    

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

slug   string  optional    

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

description   string  optional    

Descrição. Example: Example Description

abbreviation   string  optional    

Abreviação. O campo value não pode ser superior a 10 caracteres. Example: Example Abbreviation

image   object  optional    

Imagem.

path   string  optional    

Caminho da imagem. O campo value não pode ser superior a 255 caracteres. Example: Example Image path

url   string  optional    

URL da imagem. Must be a valid URL. Example: https://example.com

name   string  optional    

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

size   string  optional    

Tamanho da imagem. O campo value não pode ser superior a 50 caracteres. Example: Example Image size

extension   string  optional    

Extensão da imagem. O campo value não pode ser superior a 10 caracteres. Example: Example Image extension

Delete sector

requires authentication sector delete

Delete a sector

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 8

sector   string     

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

List sector users

requires authentication sector show

List all users assigned to a sector

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


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

Example response (200):


{
    "data": [
        {
            "id": "0ad6f8d7-0004-3d79-8c41-3e572c3bc158",
            "name": "Kirsten Bogisich MD",
            "username": "jrippin",
            "email": "lucious.klocko@example.com",
            "certification": null,
            "crea": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "5b832706-95ea-3f9c-80ca-90e1540ab39f",
            "name": "Una Halvorson",
            "username": "hillard.christiansen",
            "email": "eschumm@example.net",
            "certification": null,
            "crea": 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 a34kDE16gbcaf6ZdhevPV58

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 D5ZEaV34dPcef68vhbg16ak" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"1b1b5594-ee8c-3c1e-b5e7-f5bd66055190\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "1b1b5594-ee8c-3c1e-b5e7-f5bd66055190"
    ]
};

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 D5ZEaV34dPcef68vhbg16ak

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 1chV34efZ8E6vaPd5gDbka6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"746cd95c-1d6d-3f3d-8d9b-a91642811133\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "746cd95c-1d6d-3f3d-8d9b-a91642811133"
    ]
};

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

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 e5Vg8vkfcah1ad64EbZ3P6D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"94783345-4581-30c8-a5d4-7f00f57ba22e\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "94783345-4581-30c8-a5d4-7f00f57ba22e"
    ]
};

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 e5Vg8vkfcah1ad64EbZ3P6D

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


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

Example response (200):


{
    "data": [
        {
            "name": "molestiae nihil",
            "slug": "et-earum-sint-facilis-qui-et"
        },
        {
            "name": "praesentium et",
            "slug": "debitis-et-ex-nostrum-quasi"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer 16e3h6P8DcZafdbavg54kVE

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


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

Example response (200):


{
    "data": [
        {
            "id": "22313f22-3a9e-3d5f-912d-1f024d0fa307",
            "slug": null,
            "name": null,
            "description": "Emanuelly Ferreira Jimenes",
            "abbreviation": "recusandae",
            "color": "#4d8a67",
            "text_color": "#fb6fc1",
            "module": {
                "name": "Obras",
                "slug": "work"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e9583050-23a8-3632-99e8-50e75d61fc83",
            "slug": null,
            "name": null,
            "description": "Tâmara Salgado",
            "abbreviation": "nisi",
            "color": "#727142",
            "text_color": "#979610",
            "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 fdkeg64Dbv35Ea8caV1hZP6

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 aVZ14feaP8Edhv35kDgb66c" \
    --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\": \"1d13872e-5196-3ade-9e7d-1c125cad7a5e\",
    \"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 aVZ14feaP8Edhv35kDgb66c",
    "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": "1d13872e-5196-3ade-9e7d-1c125cad7a5e",
    "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 aVZ14feaP8Edhv35kDgb66c

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: 1d13872e-5196-3ade-9e7d-1c125cad7a5e

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


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

Example response (200):


{
    "data": {
        "id": "879241b1-6239-38c5-bf1f-0f53278d920d",
        "slug": null,
        "name": null,
        "description": "Christopher Márcio Balestero Neto",
        "abbreviation": "laudantium",
        "color": "#d0f075",
        "text_color": "#c6ad02",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer ae6Ec4kahDv18fZ3PV6g5db

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 aDgkhV5a8fd1Z63be6P4Ecv" \
    --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\": \"ee6cb63b-52df-3d6b-851c-ec024c5bb89f\",
    \"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 aDgkhV5a8fd1Z63be6P4Ecv",
    "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": "ee6cb63b-52df-3d6b-851c-ec024c5bb89f",
    "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 aDgkhV5a8fd1Z63be6P4Ecv

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: ee6cb63b-52df-3d6b-851c-ec024c5bb89f

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "0f505798-19d6-3fdd-960b-2e740c9a5834",
            "quantity": 947.4908,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7156b2ae-a4ef-3d1e-aa3e-afbeaefcabe7",
            "quantity": 120.8261,
            "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 hk15c4gZf6vEdeVb6D8Paa3

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


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

Example response (200):


{
    "data": [
        {
            "id": "8375c61a-9241-38df-9b6e-51919c0ac297",
            "name": "Estoque Salas Comercial Ltda.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7ce45408-caa6-3f24-95ed-2e0126585692",
            "name": "Estoque Ávila e Branco",
            "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 DaV6k6f3agh1v5cEZb4d8eP

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 kZ13EDab8dch45aPVfev6g6" \
    --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 kZ13EDab8dch45aPVfev6g6",
    "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": "c0632dac-0fa4-3f55-9c33-f0074d0b97cd",
        "name": "Estoque Carrara-de Arruda",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer kZ13EDab8dch45aPVfev6g6

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


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

Example response (200):


{
    "data": {
        "id": "f26e9695-977f-3825-a257-44e7bbbff619",
        "name": "Estoque Correia e Filhos",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/main

Headers

Authorization        

Example: Bearer c86ZE4aebDPk36adv51Vfhg

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


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

Example response (200):


{
    "data": {
        "id": "99694b3f-f778-36fb-ac89-9175f62d55d9",
        "name": "Estoque de Arruda-Lovato",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer defaV4PahbE86Zv3165kcgD

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 c1PeDfZbah3E5da6gvV864k" \
    --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 c1PeDfZbah3E5da6gvV864k",
    "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": "cbe8c07c-55f8-3c0d-a6b2-7fa78e911875",
        "name": "Estoque Paz e Gusmão 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 c1PeDfZbah3E5da6gvV864k

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "54168414-1a09-3956-bebc-4d0b538d9540",
            "quantity": 115.3267,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "9424afc8-6380-3a0e-b9ee-297e4b70fdef",
            "quantity": 440.3513,
            "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 egDV6c14khEbvfZ53aa68Pd

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

const headers = {
    "Authorization": "Bearer 3abDk61vf6dh4eZ58gVEPca",
    "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": "345ca0f2-487a-3685-b1f9-2c4b2f33b258",
        "quantity": 848.2577,
        "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 3abDk61vf6dh4eZ58gVEPca

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "54d93d3e-0dce-3ca2-9a9a-0e2243d7b353",
            "code": "MOV-333663",
            "type": "devolução",
            "type_name": "RETURN",
            "is_entry": true,
            "is_exit": false,
            "quantity": 82.0875,
            "previous_quantity": 504.2066,
            "new_quantity": 586.2941,
            "reason": "Harum aliquam nemo commodi aliquid.",
            "movement_date": "2026-07-07T07:30:02.000000Z",
            "created_at": null
        },
        {
            "id": "0a103a36-02da-3775-80cf-8fa86360086e",
            "code": "MOV-782737",
            "type": "compra",
            "type_name": "PURCHASE",
            "is_entry": true,
            "is_exit": false,
            "quantity": 75.6144,
            "previous_quantity": 798.3672,
            "new_quantity": 873.9816,
            "reason": null,
            "movement_date": "2026-07-13T14:55:25.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 ceDZf6h8Pgd6E34bvV1ak5a

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 cVZak46g85e6Ebdh1fDvPa3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"f470efc6-ca56-3343-a888-b695ea8029e1\",
    \"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 cVZak46g85e6Ebdh1fDvPa3",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "f470efc6-ca56-3343-a888-b695ea8029e1",
    "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": "bf9445a9-175a-36c6-8425-66637a7deff9",
        "code": "MOV-093241",
        "type": "compra",
        "type_name": "PURCHASE",
        "is_entry": true,
        "is_exit": false,
        "quantity": 53.3925,
        "previous_quantity": 981.1147,
        "new_quantity": 1034.5072,
        "reason": "Culpa omnis maxime beatae est.",
        "movement_date": "2026-06-28T20:41:40.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer cVZak46g85e6Ebdh1fDvPa3

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: f470efc6-ca56-3343-a888-b695ea8029e1

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 ehkVZ5aafcgbDvE6P1d4638" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"179a4fef-c244-3db9-9b45-3276b254e7ff\",
    \"destination_stock_id\": \"ca6b9c7a-03da-383e-a091-f3e91280f649\",
    \"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 ehkVZ5aafcgbDvE6P1d4638",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "179a4fef-c244-3db9-9b45-3276b254e7ff",
    "destination_stock_id": "ca6b9c7a-03da-383e-a091-f3e91280f649",
    "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": "745f9b22-72af-38c8-bc3c-756062c8bd4c",
        "code": "MOV-779749",
        "type": "produção",
        "type_name": "PRODUCTION",
        "is_entry": true,
        "is_exit": false,
        "quantity": 16.1424,
        "previous_quantity": 15.7136,
        "new_quantity": 31.856,
        "reason": "Aliquam maxime deleniti recusandae iure hic pariatur qui ut.",
        "movement_date": "2026-06-27T23:00:12.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer ehkVZ5aafcgbDvE6P1d4638

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: 179a4fef-c244-3db9-9b45-3276b254e7ff

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: ca6b9c7a-03da-383e-a091-f3e91280f649

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "e51af12c-a409-34e3-b945-a45222b3e489",
            "name": "Sandro Fontes Sobrinho",
            "email": "nquintana@example.com",
            "phone": "(18) 4608-4920",
            "document": "94.536.673/0001-04",
            "type": "pj",
            "responsible": "Sra. Stella Bruna Delgado",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "61102940-ec87-3fe6-85bc-d5246f28c252",
            "name": "Saulo Assunção Cervantes",
            "email": "verdugo.agostinho@example.org",
            "phone": "(74) 2404-4660",
            "document": "07.837.514/0001-45",
            "type": "pf",
            "responsible": "Dr. Franco Mascarenhas",
            "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 DfkP4c5b31adhEe6aVgvZ68

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

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


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

Example response (200):


{
    "data": {
        "id": "d5173e76-d107-31dc-8173-3513c9e2599c",
        "name": "Srta. Estela Viviane Paes Filho",
        "email": "richard87@example.com",
        "phone": "(66) 3910-7957",
        "document": "32.888.243/0001-02",
        "type": "pf",
        "responsible": "Hernani Salas Filho",
        "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 3ZvD8Egeaahc61V5d6kfP4b

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

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "84820028-bb23-3d27-b26b-a1cfe85e5189",
            "name": "Antônio Juliano Casanova Neto",
            "description": "Quaerat et sed sed. Velit non consequatur qui aperiam. Aliquam blanditiis dolore quis corporis enim non ea eius.",
            "type": "ajuste"
        },
        {
            "id": "2a3e3f20-0f64-307e-962c-007e2926d5fb",
            "name": "Joyce Gonçalves Rezende",
            "description": "Voluptatem non consequatur molestiae explicabo eaque illo. Sit qui unde eos quis optio qui. Fugiat placeat officia quaerat eveniet est vel illum sint. Ea quisquam dolor explicabo et.",
            "type": "tarifa"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/transaction-categories

Headers

Authorization        

Example: Bearer V4gD6Pd1Za8v3Ebe6hcfk5a

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

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


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

Example response (200):


{
    "data": {
        "id": "e311d2b2-6ea2-327c-b742-faefb19fe5f7",
        "name": "Dirce Queirós",
        "description": "Aut sapiente ut sed qui sequi perferendis maxime. Ipsum voluptate laudantium distinctio quam ab qui. Earum amet vitae doloribus cumque. Sed accusantium odit quis quod quis. Quo rem nihil dolore.",
        "type": "pagamento"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer ak61Pvfh6E5D3VdeZag4b8c

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: voluptas

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: consectetur

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: quia

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


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

Example response (200):


{
    "data": [
        {
            "id": "969d58f7-b0fc-36b0-88b1-1a059964100c",
            "name": "Srta. Nathalia Sepúlveda Carmona",
            "abbreviation": "Srta. Flávia Poliana Alcantara",
            "description": "Unde sunt nihil est.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "991428bd-fbaa-319d-89db-d55cff52969b",
            "name": "Srta. Lara Yohanna Vega",
            "abbreviation": "Sr. Téo Marcelo Garcia",
            "description": "Sed quia nam consectetur.",
            "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 ZaPVhc6kvgae3db185E64fD

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


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

Example response (200):


{
    "data": {
        "id": "b21b8895-b076-3d55-bf09-a3ae9316042a",
        "name": "Dr. Willian Barros Faro Sobrinho",
        "abbreviation": "Regiane Samanta Barros Filho",
        "description": "Quibusdam ut dolor ut id.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer 8dcah65gbZeDfv3V14aEP6k

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: eveniet

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


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

Example response (200):


{
    "data": [
        {
            "id": "6046556c-3c03-3c99-a7e9-23771fa7d4f8",
            "name": "Lue Nicolas",
            "username": "rlang",
            "email": "gibson.clair@example.net",
            "certification": null,
            "crea": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "dd3be2c8-c3c2-331f-b771-b0ddfb23e12a",
            "name": "Mr. Silas Gislason",
            "username": "brando.upton",
            "email": "morton98@example.org",
            "certification": null,
            "crea": 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 kbgfdED56c1va34PhZ8Vae6

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


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

Example response (200):


{
    "data": {
        "id": "b6f42516-ea90-3a96-9891-7c746edeede1",
        "name": "Prof. Adolphus Skiles DVM",
        "username": "russel.hessel",
        "email": "cwhite@example.org",
        "certification": null,
        "crea": null,
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization        

Example: Bearer EkDh45Z1efP636Vadc8bgav

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 PVav1DagZd6hek65bE8c4f3" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"jeramie99\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"4724223a-4204-345a-956c-36a00c4c4829\"
    ],
    \"roles\": [
        \"8bebabe0-aa07-39f5-b730-ac6caae86d7c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "jeramie99",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "4724223a-4204-345a-956c-36a00c4c4829"
    ],
    "roles": [
        "8bebabe0-aa07-39f5-b730-ac6caae86d7c"
    ]
};

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 PVav1DagZd6hek65bE8c4f3

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

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 fE4eaPhDdbkg163aVc68vZ5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"certification\": \"Example Certification\",
    \"crea\": \"Example Crea\",
    \"email\": \"user@example.com\",
    \"username\": \"cartwright.favian\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"c6c5ecda-0321-3ed0-8541-62224e86e2f1\"
    ],
    \"roles\": [
        \"70789015-13fa-3a37-b5bf-eaa46eeac8ed\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "certification": "Example Certification",
    "crea": "Example Crea",
    "email": "user@example.com",
    "username": "cartwright.favian",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "c6c5ecda-0321-3ed0-8541-62224e86e2f1"
    ],
    "roles": [
        "70789015-13fa-3a37-b5bf-eaa46eeac8ed"
    ]
};

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 fE4eaPhDdbkg163aVc68vZ5

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: cartwright.favian

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

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

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 v6haZEb418Vgcd6DeaPfk53" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"70476903-4af3-3623-a124-2993af0bc474\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "70476903-4af3-3623-a124-2993af0bc474"
    ]
};

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 v6haZEb418Vgcd6DeaPfk53

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "earum",
            "display_name": "Et debitis numquam vero pariatur dolor."
        },
        {
            "id": null,
            "name": "aut",
            "display_name": "Est sit alias soluta laudantium nam laborum sunt exercitationem."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer 3gdc5fZVeak416hvb8PD6aE

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


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

Example response (200):


{
    "data": [
        {
            "id": "77e8b41b-1a05-307f-a0cd-fe7ff97bf26b",
            "description": "Dr. Benício Dante Jimenes Neto",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "e858922e-1141-3331-90a5-4223a4d1f1e0",
            "description": "Sra. Sophia Késia Caldeira Filho",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/work-locations

Headers

Authorization        

Example: Bearer 1Z4PvDdeaf3Vha8665bkgEc

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 Pcdef6EZa4V86hbgvka513D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"6c87529a-b4ed-3580-93b3-f40a2e7d5bee\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Example Description",
    "work_id": "6c87529a-b4ed-3580-93b3-f40a2e7d5bee"
};

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 Pcdef6EZa4V86hbgvka513D

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: 6c87529a-b4ed-3580-93b3-f40a2e7d5bee

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


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

Example response (200):


{
    "data": {
        "id": "b5ae38fe-a8ce-3ce9-9f29-bdf510044815",
        "description": "Clara Michele Assunção Sobrinho",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer 5Pckg6a41b8Ev6fZhaVdD3e

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 E3aVa1bfe5Z68PDh4cv6dkg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"dad2b448-45fc-3573-aeea-703116edeca8\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Example Description",
    "work_id": "dad2b448-45fc-3573-aeea-703116edeca8"
};

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 E3aVa1bfe5Z68PDh4cv6dkg

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: dad2b448-45fc-3573-aeea-703116edeca8

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "7b21f407-ad90-399c-8d2c-3ec70da399e3",
            "name": "Bruna Lívia Uchoa",
            "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": "2004-12-09 06:35:03.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "deca6265-2bbd-35a6-9b95-d075345fd142",
            "name": "Sra. Cecília Valência Molina",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "product_quantity_lists_count": 0,
            "product_quantity_list_items_count": 0,
            "product_requests_count": 0,
            "product_request_items_count": 0,
            "documents_count": 0,
            "locations_documents_count": 0,
            "total_documents_count": 0,
            "daily_logs_count": 0,
            "projects_count": 0,
            "started_at": {
                "date": "1997-12-16 20:54:28.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 fhcb13Za85aVvPdD6g4keE6

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 Paf6h6EdbZ3e1V5a4v8gckD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"f6df3d4e-5191-3097-a6a7-7cc6da7b53a9\",
    \"status_id\": \"4a2132bd-c000-31b9-9132-2303de1f0b9b\",
    \"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 Paf6h6EdbZ3e1V5a4v8gckD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "f6df3d4e-5191-3097-a6a7-7cc6da7b53a9",
    "status_id": "4a2132bd-c000-31b9-9132-2303de1f0b9b",
    "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 Paf6h6EdbZ3e1V5a4v8gckD

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: f6df3d4e-5191-3097-a6a7-7cc6da7b53a9

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: 4a2132bd-c000-31b9-9132-2303de1f0b9b

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


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

Example response (200):


{
    "data": {
        "id": "caa7a932-8c85-311e-b3c6-eda3e4320d56",
        "name": "Wagner Branco Assunção",
        "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-11-23 12:37:45.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer hbavkVDfEcg6a3Ze4518d6P

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 41v8e3Za6DgEPcV5abk6fdh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"a31dd1a0-5165-3834-b51d-38d7fe9f3bcd\",
    \"status_id\": \"e59b3477-6eca-3d49-ac67-9ca7ad613bb3\",
    \"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 41v8e3Za6DgEPcV5abk6fdh",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "a31dd1a0-5165-3834-b51d-38d7fe9f3bcd",
    "status_id": "e59b3477-6eca-3d49-ac67-9ca7ad613bb3",
    "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 41v8e3Za6DgEPcV5abk6fdh

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: a31dd1a0-5165-3834-b51d-38d7fe9f3bcd

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: e59b3477-6eca-3d49-ac67-9ca7ad613bb3

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "694ae24e-7389-3661-a0f9-c33d30a93922",
            "name": "Mariane Rolfson",
            "username": "vergie26",
            "email": "schmidt.stanley@example.net",
            "certification": null,
            "crea": null,
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "08a78b69-bc45-31e5-85c4-b976d9335a16",
            "name": "Kay Schmeler",
            "username": "rau.kieran",
            "email": "amoen@example.org",
            "certification": null,
            "crea": 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 g1EZ5ekfPV8463bdac6hDav

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 vP4eEaD8hf3gVbk5a616cZd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"2d402d54-75da-37e1-bebe-a36ef5d5dde8\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

let body = {
    "users": [
        "2d402d54-75da-37e1-bebe-a36ef5d5dde8"
    ]
};

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 vP4eEaD8hf3gVbk5a616cZd

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 kf6E4a1385ZgPvcbeVhdaD6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"86cdd6a6-b96e-3feb-b451-b8cdf6480d33\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

let body = {
    "users": [
        "86cdd6a6-b96e-3feb-b451-b8cdf6480d33"
    ]
};

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 kf6E4a1385ZgPvcbeVhdaD6

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 4b13a8E6DPka5hVcfdZgev6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"dc7e2be6-b65b-36b1-a4db-82beba764a7c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

let body = {
    "users": [
        "dc7e2be6-b65b-36b1-a4db-82beba764a7c"
    ]
};

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 4b13a8E6DPka5hVcfdZgev6

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.