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


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

Example response (200):


{
    "data": [
        {
            "id": "9bba48b6-e1af-3b10-9b2d-328f4658685d",
            "name": "distinctio-6a43b47d45be2",
            "display_name": "Laboriosam minus eum autem non necessitatibus vero.",
            "permissions_count": null
        },
        {
            "id": "4224790b-5d4e-3fe4-95f7-caf1f9fcdeac",
            "name": "sed-6a43b47d4f187",
            "display_name": "Rem consequatur omnis tenetur et culpa molestiae reprehenderit.",
            "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 6kca36haED84VZ1vbfeg5Pd

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 vdVeca38baPDE5fZ4g6h61k" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"e6f9ad10-46dc-3779-8075-df9b8932fb34\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "e6f9ad10-46dc-3779-8075-df9b8932fb34"
    ]
};

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 vdVeca38baPDE5fZ4g6h61k

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 vk16bdag36caVZ8eDf45EPh" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"54728d6b-c892-34f7-9504-82ddecab5ebc\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "54728d6b-c892-34f7-9504-82ddecab5ebc"
    ]
};

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 vk16bdag36caVZ8eDf45EPh

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


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

Example response (200):


{
    "data": {
        "id": "ec38f80d-1231-3320-ba13-84175543a69c",
        "name": "sint-6a43b47d6e5b8",
        "display_name": "Pariatur ea molestias nostrum.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization        

Example: Bearer gkvf66VZ4ah58cPaEbed3D1

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 5ghdvVbfE6PZ1aD4ck6e38a" \
    --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 5ghdvVbfE6PZ1aD4ck6e38a",
    "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": "Iure veritatis ut saepe blanditiis ea sunt."
        },
        {
            "id": null,
            "name": "iusto",
            "display_name": "Ratione quibusdam eius labore aspernatur corporis autem laudantium."
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer 5ghdvVbfE6PZ1aD4ck6e38a

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "qui",
            "display_name": "Ducimus incidunt eligendi et magni non."
        },
        {
            "id": null,
            "name": "distinctio",
            "display_name": "Et aut recusandae quisquam ut."
        }
    ],
    "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 5v1gE3e48cfk6bDVPdahZ6a

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

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

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


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

Example response (200):


{
    "data": {
        "id": null,
        "name": "voluptas",
        "display_name": "In voluptatem quaerat laborum perferendis consequatur voluptates."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization        

Example: Bearer 1kVDaf8Pa6bdeE6h4g5Zc3v

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "892ff308-897e-3fc7-ae23-8983e6bd16e0",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 7662.13,
            "due_date": "2026-07-27T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Voluptate et quo dolor qui id quo quibusdam aperiam vel esse 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": "unde",
            "field2": 85,
            "field3": true,
            "notes": "Qui qui ut quo et.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "3c20bf6c-6368-3843-a5ef-6dcc2fee510a",
            "code": null,
            "type": "saída",
            "payment_method": "boleto",
            "amount": 9750.95,
            "due_date": "2026-07-23T03: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": "In at fugit explicabo dolorem possimus debitis voluptate sit iusto fugit porro.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "sit",
            "field2": 17,
            "field3": true,
            "notes": "Omnis ut dolor saepe cumque.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization        

Example: Bearer aba846fPeDkEgdhv653Z1Vc

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

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

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

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[]=quod&suppliers[]=officiis&works[]=commodi&statuses[]=vencido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&protest_date_start=2026-06-30T09%3A20%3A13&protest_date_end=2026-06-30T09%3A20%3A13&has_protest=1&has_children=1&is_recurring=1" \
    --header "Authorization: Bearer 5e3VE8fv6hkb6PZaDcd1ag4" \
    --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]": "quod",
    "suppliers[0]": "officiis",
    "works[0]": "commodi",
    "statuses[0]": "vencido",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "protest_date_start": "2026-06-30T09:20:13",
    "protest_date_end": "2026-06-30T09:20:13",
    "has_protest": "1",
    "has_children": "1",
    "is_recurring": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "6877261f-3cec-35c2-8eeb-a279433146ab",
            "code": null,
            "type": "entrada",
            "payment_method": "cheque",
            "amount": 2354.25,
            "due_date": "2026-07-25T03: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": "Maiores sit enim placeat debitis et fugiat placeat suscipit dolorem aut nostrum consectetur quisquam laboriosam.",
            "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": "id",
            "field2": 24,
            "field3": false,
            "notes": "Quae minus iste eum omnis ex.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "06ec48ba-4fcf-30cd-807c-b0d8c80b7139",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 8910.9,
            "due_date": "2026-07-25T03: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": "Adipisci iure alias aperiam adipisci at et itaque.",
            "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": "iure",
            "field2": 43,
            "field3": true,
            "notes": "Hic assumenda itaque ut nesciunt omnis qui.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/accounts-payable-receivable/protests

Headers

Authorization        

Example: Bearer 5e3VE8fv6hkb6PZaDcd1ag4

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-06-30T09:20:13

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-06-30T09:20:13

has_protest   boolean  optional    

Example: true

has_children   boolean  optional    

Filter accounts that have recurring children. Example: true

is_recurring   boolean  optional    

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

List accounts payable receivable

requires authentication accounts-payable-receivable index

List all accounts payable receivable

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "9f2ff484-3d37-3944-a922-ffe22fbb4e4e",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 7754.83,
            "due_date": "2026-07-24T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "At voluptates quis fuga enim omnis dolores et.",
            "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": "harum",
            "field2": 95,
            "field3": false,
            "notes": "Id enim voluptas qui assumenda hic iusto.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6ac527db-53e7-3447-8606-25312d60e2e7",
            "code": null,
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 250.13,
            "due_date": "2026-07-22T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "protest_date": null,
            "paid_amount": null,
            "interest_amount": null,
            "penalty_amount": null,
            "notary_fee_amount": null,
            "description": "Amet omnis sunt dignissimos est dolore voluptas doloremque.",
            "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": 15,
            "field3": true,
            "notes": "Molestias qui dolores impedit ut qui quaerat.",
            "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 3EefP8VDha56kdbga1cv4Z6

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-06-30T09:20:13

protest_date_end   string  optional    

O campo value deve ser uma data válida. Example: 2026-06-30T09:20:13

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 f5d1hEDabv4gZeckPa3668V" \
    --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\": \"e7bc8127-e4e2-3b3f-b219-a279f2556771\",
    \"customer_id\": \"4e6d90b6-7c1a-3a11-bf65-a4b3bb3fa204\",
    \"work_id\": \"2a052338-69a7-3b8b-9ee2-72ecf9147ec8\",
    \"status\": \"Example Status\",
    \"protest_date\": \"2024-01-01\",
    \"bank_account_id\": \"d9c51b06-7dae-3241-aec3-a7f3c6f20946\",
    \"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 f5d1hEDabv4gZeckPa3668V",
    "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": "e7bc8127-e4e2-3b3f-b219-a279f2556771",
    "customer_id": "4e6d90b6-7c1a-3a11-bf65-a4b3bb3fa204",
    "work_id": "2a052338-69a7-3b8b-9ee2-72ecf9147ec8",
    "status": "Example Status",
    "protest_date": "2024-01-01",
    "bank_account_id": "d9c51b06-7dae-3241-aec3-a7f3c6f20946",
    "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 f5d1hEDabv4gZeckPa3668V

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: e7bc8127-e4e2-3b3f-b219-a279f2556771

customer_id   string  optional    

Cliente. The uuid of an existing record in the customers table. Example: 4e6d90b6-7c1a-3a11-bf65-a4b3bb3fa204

work_id   string  optional    

Obra. The uuid of an existing record in the works table. Example: 2a052338-69a7-3b8b-9ee2-72ecf9147ec8

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: d9c51b06-7dae-3241-aec3-a7f3c6f20946

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

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

let body = {
    "fiscal_document_id": "velit",
    "installment_ids": [
        "aut"
    ],
    "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 85EV16hf64kcPdZbaDaveg3

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: delectus

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

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


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

Example response (200):


{
    "data": {
        "id": "c1646a2a-1ba2-39e8-aba3-7666f6eb7c49",
        "code": null,
        "type": "entrada",
        "payment_method": "cheque",
        "amount": 3222.67,
        "due_date": "2026-07-14T03: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": "Qui quasi voluptates aliquam eaque itaque nostrum culpa velit distinctio laboriosam sunt et nulla.",
        "is_recurring": null,
        "recurrence_config": null,
        "parent_id": null,
        "recurrence_order": 1,
        "total_recurrences": null,
        "children_count": 0,
        "remaining_recurrences": null,
        "has_children": false,
        "field1": "labore",
        "field2": 80,
        "field3": false,
        "notes": "Et ab vero saepe esse.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer g8dE54hDvakPc6V3a6bef1Z

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: facilis

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/pariatur" \
    --header "Authorization: Bearer 8gvkE5dce41hDaZV63af6Pb" \
    --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\": \"31089fac-70cd-31bd-9c65-bb209580eded\",
    \"customer_id\": \"3ff531dd-8f4f-36fe-9392-8767e8852cd8\",
    \"work_id\": \"71e2394b-7337-342f-b0af-739548e31243\",
    \"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\": \"23768a03-4586-35e9-abaa-d2dabf2d2a23\",
    \"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/pariatur"
);

const headers = {
    "Authorization": "Bearer 8gvkE5dce41hDaZV63af6Pb",
    "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": "31089fac-70cd-31bd-9c65-bb209580eded",
    "customer_id": "3ff531dd-8f4f-36fe-9392-8767e8852cd8",
    "work_id": "71e2394b-7337-342f-b0af-739548e31243",
    "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": "23768a03-4586-35e9-abaa-d2dabf2d2a23",
    "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 8gvkE5dce41hDaZV63af6Pb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: pariatur

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: 31089fac-70cd-31bd-9c65-bb209580eded

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 3ff531dd-8f4f-36fe-9392-8767e8852cd8

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 71e2394b-7337-342f-b0af-739548e31243

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: 23768a03-4586-35e9-abaa-d2dabf2d2a23

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

accountPayableReceivable   string     

Example: provident

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

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

let body = {
    "email": "cassin.diego@example.org",
    "password": "password"
};

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

Example response (200):


{
    "token": "string"
}
 

Request      

POST api/auth/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

Example: cassin.diego@example.org

password   string     

User password. Example: password

Me

requires authentication No specific permission required

Get the current user

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


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

Example response (200):


{
    "data": {
        "id": "58d76bcd-9d78-3419-ae88-8f00a69a2c05",
        "name": "Christopher Cronin DDS",
        "username": "mcdermott.kelton",
        "email": "okuneva.tillman@example.com",
        "ability": [
            {
                "action": "read",
                "subject": "Auth"
            },
            {
                "action": "listar",
                "subject": "padrão"
            }
        ],
        "roles": [],
        "preferences": [],
        "sectors": [],
        "image": {
            "id": null,
            "url": null
        }
    }
}
 

Request      

GET api/auth/user

Headers

Authorization        

Example: Bearer De4P8gh3a6bacVkZv5df6E1

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 k43VE8bhafv56g6cDPZead1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"username\": \"wolff.darwin\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"5319e381-f3dd-387c-bcea-992071262ad1\"
    ],
    \"roles\": [
        \"7155e013-1e67-3169-b2ed-e31b5a2d763b\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "email": "user@example.com",
    "username": "wolff.darwin",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "5319e381-f3dd-387c-bcea-992071262ad1"
    ],
    "roles": [
        "7155e013-1e67-3169-b2ed-e31b5a2d763b"
    ]
};

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 k43VE8bhafv56g6cDPZead1

Content-Type        

Example: application/json

Accept        

Example: application/json

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

username   string  optional    

Usuário. Example: wolff.darwin

password   string  optional    

Password. Example: password123

image   object  optional    

Imagem.

path   string  optional    

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

name   string  optional    

Nome da imagem. Example: Example Name

extension   string  optional    

Extensão da imagem. Example: Example Image extension

size   string  optional    

Tamanho da imagem. Example: Example Image size

sectors   string[]  optional    

UUID do setor. The uuid of an existing record in the sectors table.

roles   string[]  optional    

UUID da função. The uuid of an existing record in the roles table.

Logout

requires authentication No specific permission required

Logout the current user

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/auth/logout" \
    --header "Authorization: Bearer 8dca6kg3D4P61hVEZvefa5b" \
    --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 8dca6kg3D4P61hVEZvefa5b",
    "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 8dca6kg3D4P61hVEZvefa5b

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

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

key   string     

Example: accusantium

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankTransfer   string     

Example: tempore

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 6

Body Parameters

amount   number     

Amount. Example: 1

description   string  optional    

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

transaction_date   string     

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

transaction_category_id   string  optional    

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

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

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

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

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

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


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

Example response (200):


{
    "data": {
        "id": "453192af-0dad-35bf-958e-28bb6e98f43c",
        "agency": "3351",
        "account": "1808275-9",
        "type": "corrente",
        "balance": 1020.23,
        "holder_type": "pf",
        "alias": "commodi",
        "limit": 4116.32,
        "available_balance": 5136.549999999999,
        "used_limit": 0,
        "available_limit": 4116.32,
        "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 85cab4fg6akZeEvDPVh13d6

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


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

Example response (200):


{
    "data": [
        {
            "id": "db75cb6a-8e0f-31d0-a0ce-ee557c940ec4",
            "agency": "7497",
            "account": "8569463-6",
            "type": "caixa",
            "balance": 8611.53,
            "holder_type": "pf",
            "alias": "cupiditate",
            "limit": 4308.6,
            "available_balance": 12920.130000000001,
            "used_limit": 0,
            "available_limit": 4308.6,
            "is_default": null,
            "default_payment_method": null,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "951fb71f-c08e-39b5-b7f3-93f038622b9b",
            "agency": "0253",
            "account": "6353269-1",
            "type": "corrente",
            "balance": 2145.56,
            "holder_type": "pj",
            "alias": "id",
            "limit": 9071.37,
            "available_balance": 11216.93,
            "used_limit": 0,
            "available_limit": 9071.37,
            "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 b5kh8gZva3fc6EaD6VPde41

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 6PgZkV8DvfEec613bd4ha5a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"3888132-1\",
    \"bank_id\": \"0a16c471-8422-3d5b-b940-f5ea530bde84\",
    \"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 6PgZkV8DvfEec613bd4ha5a",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "agency": "Example Agency",
    "account": "3888132-1",
    "bank_id": "0a16c471-8422-3d5b-b940-f5ea530bde84",
    "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 6PgZkV8DvfEec613bd4ha5a

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

agency   string     

Agency. Example: Example Agency

account   string     

Account. Example: 3888132-1

bank_id   string     

Bank id. The uuid of an existing record in the banks table. Example: 0a16c471-8422-3d5b-b940-f5ea530bde84

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/12" \
    --header "Authorization: Bearer cdPaa61hD83bk4EZeVvfg65" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"6201824-3\",
    \"bank_id\": \"ba385885-ad5e-3272-9252-0971fc348af8\",
    \"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/12"
);

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

let body = {
    "agency": "Example Agency",
    "account": "6201824-3",
    "bank_id": "ba385885-ad5e-3272-9252-0971fc348af8",
    "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 cdPaa61hD83bk4EZeVvfg65

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 12

Body Parameters

agency   string  optional    

Agency. Example: Example Agency

account   string  optional    

Account. Example: 6201824-3

bank_id   string  optional    

Bank id. The uuid of an existing record in the banks table. Example: ba385885-ad5e-3272-9252-0971fc348af8

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

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


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

Example response (200):


{
    "data": {
        "id": "6a2e604c-7b82-3625-9ccf-f0cb1f275d4f",
        "agency": "0616",
        "account": "0837184-0",
        "type": "caixa",
        "balance": 3274.51,
        "holder_type": "pj",
        "alias": "iure",
        "limit": 3072.47,
        "available_balance": 6346.98,
        "used_limit": 0,
        "available_limit": 3072.47,
        "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 aghev16kPc43Vd6Eaf8Z5bD

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 8

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 10

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/19/statements/summary" \
    --header "Authorization: Bearer 6dfc85DkaV4bPEh6v3a1Zeg" \
    --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/19/statements/summary"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 19

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/5/statements" \
    --header "Authorization: Bearer a3fdbEgVk1D48hvP6Z6c5ae" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"voluptas\",
    \"sort_desc\": true,
    \"page\": 24,
    \"per_page\": 1,
    \"q\": \"bsvkbhakcaldurrwcjwm\",
    \"type\": \"ajuste\",
    \"date_start\": \"2026-06-30T09:20:14\",
    \"date_end\": \"2027-03-28\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/5/statements"
);

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

let body = {
    "sort_by": "voluptas",
    "sort_desc": true,
    "page": 24,
    "per_page": 1,
    "q": "bsvkbhakcaldurrwcjwm",
    "type": "ajuste",
    "date_start": "2026-06-30T09:20:14",
    "date_end": "2027-03-28"
};

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 a3fdbEgVk1D48hvP6Z6c5ae

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 5

Body Parameters

sort_by   string  optional    

Example: voluptas

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

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

type   string  optional    

Example: ajuste

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-06-30T09:20:14

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: 2027-03-28

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

bankAccount   integer     

Example: 16

bankStatement   string     

Example: modi

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


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

Example response (200):


{
    "data": [
        {
            "id": "6396d59c-5a05-3831-9c86-d8db8b7ade20",
            "name": "Rocha e de Souza",
            "code": "34"
        },
        {
            "id": "e8f511b3-25dc-305c-a84a-e4b745b4e909",
            "name": "Meireles e Soares S.A.",
            "code": "352"
        }
    ],
    "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 DVfZh514agPcbva86de63Ek

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

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

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


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

Example response (200):


{
    "data": {
        "id": "023cfabc-4e57-3479-88bd-4b95383f81d8",
        "name": "Alves-Vila",
        "code": "566"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization        

Example: Bearer DvfkVZgd66a358ehEPb4c1a

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

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

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=Harum+distinctio+et+tempora+eos+ut.&categories[]=qui&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=ducimus&customers[]=eos&suppliers[]=temporibus&works[]=temporibus" \
    --header "Authorization: Bearer bedk8g41hDfcP6a65EV3Zva" \
    --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": "Harum distinctio et tempora eos ut.",
    "categories[0]": "qui",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "ducimus",
    "customers[0]": "eos",
    "suppliers[0]": "temporibus",
    "works[0]": "temporibus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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: Harum distinctio et tempora eos ut.

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=Et+omnis+molestias+facilis+dolores+et.&categories[]=doloribus&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=dolor&customers[]=omnis&suppliers[]=possimus&works[]=dolorem" \
    --header "Authorization: Bearer h56ca4vb68dZaDgk1EeP3Vf" \
    --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": "Et omnis molestias facilis dolores et.",
    "categories[0]": "doloribus",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "dolor",
    "customers[0]": "omnis",
    "suppliers[0]": "possimus",
    "works[0]": "dolorem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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


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

Example response (200):


{
    "data": [
        {
            "id": "5390bc3d-3061-3425-b544-96abd447ef44",
            "code": "FC-22492436",
            "type": "saída",
            "amount": -1816.6,
            "description": "Eos veritatis dolorem possimus aut omnis officiis nam.",
            "transaction_date": "1987-05-10T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "9e116d80-07e7-3143-91e1-424d99bde83f",
            "code": "FC-68565357",
            "type": "ajuste",
            "amount": 3983.93,
            "description": "Animi unde vel suscipit quo aperiam.",
            "transaction_date": "2021-12-14T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cash-flows

Headers

Authorization        

Example: Bearer h56ca4vb68dZaDgk1EeP3Vf

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: Et omnis molestias facilis dolores et.

categories   string[]  optional    

The uuid of an existing record in the transaction_categories table.

date_start   string  optional    

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

date_end   string  optional    

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

bank_accounts   string[]  optional    

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional    

The uuid of an existing record in the customers table.

suppliers   string[]  optional    

The uuid of an existing record in the suppliers table.

works   string[]  optional    

The uuid of an existing record in the works table.

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 aDeZE1d4c6P8khf5g63abVv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"0f299124-2741-3148-be6f-e4dc957ba75e\",
    \"transaction_category_id\": \"bba09927-d5ba-3ca1-85b4-26c4e647c536\",
    \"bank_account_id\": \"b6d7f197-ce58-365b-94d1-40a28a2feb4a\",
    \"customer_id\": \"a704a75f-9b66-364a-9eb6-4cf9b29e5a2f\",
    \"supplier_id\": \"ed104ae0-756f-3ef7-be59-f28588eb32e4\",
    \"work_id\": \"95ca56d4-3afc-37e6-918e-50ca34ffd85c\",
    \"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 aDeZE1d4c6P8khf5g63abVv",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "0f299124-2741-3148-be6f-e4dc957ba75e",
    "transaction_category_id": "bba09927-d5ba-3ca1-85b4-26c4e647c536",
    "bank_account_id": "b6d7f197-ce58-365b-94d1-40a28a2feb4a",
    "customer_id": "a704a75f-9b66-364a-9eb6-4cf9b29e5a2f",
    "supplier_id": "ed104ae0-756f-3ef7-be59-f28588eb32e4",
    "work_id": "95ca56d4-3afc-37e6-918e-50ca34ffd85c",
    "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 aDeZE1d4c6P8khf5g63abVv

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: 0f299124-2741-3148-be6f-e4dc957ba75e

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: bba09927-d5ba-3ca1-85b4-26c4e647c536

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: b6d7f197-ce58-365b-94d1-40a28a2feb4a

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: a704a75f-9b66-364a-9eb6-4cf9b29e5a2f

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: ed104ae0-756f-3ef7-be59-f28588eb32e4

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: 95ca56d4-3afc-37e6-918e-50ca34ffd85c

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

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


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

Example response (200):


{
    "data": {
        "id": "5f2537b4-5cfc-374a-a744-15b9802e1587",
        "code": "FC-48017099",
        "type": "entrada",
        "amount": 886.12,
        "description": "Accusamus repellendus vel et accusamus.",
        "transaction_date": "1983-04-25T03: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 14PfebDc8h3vV56Zg6kEaad

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 9

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/5" \
    --header "Authorization: Bearer e4Z5v1P8gaakVb3E6hDf6cd" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"760eef1a-c2d1-35ee-8f59-d1a7d1b752c9\",
    \"transaction_category_id\": \"aca7bb5e-90a5-31f0-a8e3-0d614c97da53\",
    \"bank_account_id\": \"99a8384d-3cd6-30ba-81fc-a09f58753ea7\",
    \"customer_id\": \"1e018253-f850-3925-9e8e-383bcaa2a0a5\",
    \"supplier_id\": \"62ba0557-2d00-3219-9a20-a8bcb1868860\",
    \"work_id\": \"faebf477-589a-3999-aa12-f85576959559\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/5"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "760eef1a-c2d1-35ee-8f59-d1a7d1b752c9",
    "transaction_category_id": "aca7bb5e-90a5-31f0-a8e3-0d614c97da53",
    "bank_account_id": "99a8384d-3cd6-30ba-81fc-a09f58753ea7",
    "customer_id": "1e018253-f850-3925-9e8e-383bcaa2a0a5",
    "supplier_id": "62ba0557-2d00-3219-9a20-a8bcb1868860",
    "work_id": "faebf477-589a-3999-aa12-f85576959559",
    "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 e4Z5v1P8gaakVb3E6hDf6cd

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 5

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: 760eef1a-c2d1-35ee-8f59-d1a7d1b752c9

transaction_category_id   string  optional    

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: aca7bb5e-90a5-31f0-a8e3-0d614c97da53

bank_account_id   string  optional    

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 99a8384d-3cd6-30ba-81fc-a09f58753ea7

customer_id   string  optional    

Customer id. The uuid of an existing record in the customers table. Example: 1e018253-f850-3925-9e8e-383bcaa2a0a5

supplier_id   string  optional    

Supplier id. The uuid of an existing record in the suppliers table. Example: 62ba0557-2d00-3219-9a20-a8bcb1868860

work_id   string  optional    

Work id. The uuid of an existing record in the works table. Example: faebf477-589a-3999-aa12-f85576959559

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

cashFlow   integer     

Example: 11

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


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

Example response (200):


{
    "data": [
        {
            "id": "af3bfa38-28a9-3988-b994-3b63c1f94488",
            "code": null,
            "opened_by": null,
            "opened_at": "2014-01-14T22:01:29.000000Z",
            "closed_by": null,
            "closed_at": "1978-01-25T13:47:18.000000Z",
            "opening_balance": 1803.42,
            "closing_balance": 4513.6,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "hasSnapshot": false,
            "created_at": "1986-07-15T21:56:42.000000Z",
            "updated_at": "1992-08-28T07:28:17.000000Z"
        },
        {
            "id": "2d84c8f6-3551-335e-9e5e-f4ccbcd9354e",
            "code": null,
            "opened_by": null,
            "opened_at": "2007-04-11T18:57:28.000000Z",
            "closed_by": null,
            "closed_at": "1994-02-15T03:43:50.000000Z",
            "opening_balance": 377.44,
            "closing_balance": 9318.44,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Aberto",
            "hasSnapshot": false,
            "created_at": "2024-05-24T12:39:13.000000Z",
            "updated_at": "1985-11-25T13:44:49.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 8Dgav6EP6fh4V3eacd1kZ5b

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


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

Example response (200):


{
    "data": {
        "id": "ad700f7b-a65b-30d1-a4c2-1434e1c05338",
        "code": null,
        "opened_by": null,
        "opened_at": "1988-02-15T01:37:54.000000Z",
        "closed_by": null,
        "closed_at": "2015-06-25T15:28:02.000000Z",
        "opening_balance": 4097.3,
        "closing_balance": 5250.78,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Aberto",
        "hasSnapshot": false,
        "created_at": "2012-08-04T20:08:05.000000Z",
        "updated_at": "1999-09-18T09:48:26.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization        

Example: Bearer b4fZ6Eade31acgk8Pv6VhD5

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/15412a3c-c0f4-3edb-a77d-90262eee029f" \
    --header "Authorization: Bearer E6aP38Dhvagc645ke1fbdVZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/15412a3c-c0f4-3edb-a77d-90262eee029f"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

Example: 15412a3c-c0f4-3edb-a77d-90262eee029f

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/967c2020-baac-32bb-9b55-f6cf7ae92ea4/account-snapshot" \
    --header "Authorization: Bearer 5e8Vgvchb3E64k1a6adZPDf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/967c2020-baac-32bb-9b55-f6cf7ae92ea4/account-snapshot"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 967c2020-baac-32bb-9b55-f6cf7ae92ea4

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/090674ef-ff70-3819-b559-6e9b009267e2" \
    --header "Authorization: Bearer cPd8VZek6Eafbg134vhD65a" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/090674ef-ff70-3819-b559-6e9b009267e2"
);

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


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

Example response (200):


{
    "data": {
        "id": "2833f4db-aea6-3d04-9787-f273a2c6930b",
        "code": null,
        "opened_by": null,
        "opened_at": "2022-10-05T19:37:19.000000Z",
        "closed_by": null,
        "closed_at": "2016-07-05T09:29:01.000000Z",
        "opening_balance": 8499.57,
        "closing_balance": 2916.59,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "hasSnapshot": false,
        "created_at": "2006-09-13T15:06:08.000000Z",
        "updated_at": "2011-04-27T20:12:31.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization        

Example: Bearer cPd8VZek6Eafbg134vhD65a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 090674ef-ff70-3819-b559-6e9b009267e2

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/1d8b24c2-685f-3974-a00a-6416b07e2586" \
    --header "Authorization: Bearer Ze6v53cD684h1fbkPgEVada" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/1d8b24c2-685f-3974-a00a-6416b07e2586"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 1d8b24c2-685f-3974-a00a-6416b07e2586

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


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

Example response (200):


{
    "data": [
        {
            "id": "1dbe341d-0d89-3fd6-9b43-2eab10162ad5",
            "name": "Sr. Santiago Mascarenhas Colaço",
            "email": "barros.lucas@example.com",
            "phone": "(93) 4286-2226",
            "document": "812.888.276-79",
            "type": "pj",
            "responsible": "Ester Lara Faria",
            "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": "ceb01167-8b38-3e5d-a029-dad796c4c709",
            "name": "Sr. Guilherme Murilo Santana Neto",
            "email": "wcaldeira@example.org",
            "phone": "(53) 4941-8814",
            "document": "581.211.342-42",
            "type": "pf",
            "responsible": "Agostinho Colaço",
            "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 egP16h4cD35f6ZEkVv8baad

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

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

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


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

Example response (200):


{
    "data": {
        "id": "1a9666c4-fb3e-3851-b14c-8d84c0fae502",
        "name": "Sr. João Christopher Maia Neto",
        "email": "salazar.hernani@example.net",
        "phone": "(27) 2679-0783",
        "document": "040.729.215-21",
        "type": "pj",
        "responsible": "Srta. Louise Azevedo Chaves",
        "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 DfvZcgh64ebaV1E6kP583da

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 5

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 14

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

customer   string     

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "d6987570-567f-3a41-8535-8c1b19fe5ccc",
            "name": "Dr. Roberto Carrara",
            "description": "Dolorem libero error id accusamus amet cumque exercitationem fuga. Labore animi eos quo adipisci quidem odio unde eveniet. Natus reiciendis reiciendis ea sed ipsa.",
            "module": "document"
        },
        {
            "id": "ee0e5349-57d8-3996-8110-69b100b8dd5d",
            "name": "Dr. Luiza Lia Pontes Sobrinho",
            "description": "Omnis voluptatem recusandae dignissimos quia neque. Placeat iure beatae qui inventore ut. Aut voluptas et facere.",
            "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 kE4P6d8Zhcv31aaD6V5efbg

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

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


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

Example response (200):


{
    "data": {
        "id": "da7fb6d5-ea03-3ce5-afac-fbe82a402403",
        "name": "Christian Felipe Bittencourt Neto",
        "description": "Iste aut ex eos est dicta est similique. Sit iste quidem aut aliquam ut. Repellendus aut distinctio quo. Dolor quas ipsum nesciunt debitis accusamus inventore.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization        

Example: Bearer v4f65Phc8V6Ee3gDaadZ1kb

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: enim

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: quae

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

documentCategory   string     

Document category UUID Example: quod

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "84a0d4bd-c184-3ca0-bdac-72d16b4e7ffc",
            "name": "Paulina Maia",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b389b36d-2e33-3e97-9923-8628b3a48242",
            "name": "Sarah Tamoio Zambrano",
            "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 Ve4kcba81hfgd36Z5DaPvE6

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

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

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


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

Example response (200):


{
    "data": {
        "id": "a68ce824-be1a-3594-ae66-c5254551266c",
        "name": "Sra. Julieta Queirós Neto",
        "file": {
            "id": null,
            "url": null,
            "extension": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/documents/{id}

Headers

Authorization        

Example: Bearer ak63f48ZadvhPVegE5bc1D6

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 17

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 5Eg46eaVc13dZhvPa6D8fbk" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"4c4dab55-bc3f-3a2b-a5a2-613b5ec516f6\",
    \"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 5Eg46eaVc13dZhvPa6D8fbk",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "4c4dab55-bc3f-3a2b-a5a2-613b5ec516f6",
    "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 5Eg46eaVc13dZhvPa6D8fbk

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: 4c4dab55-bc3f-3a2b-a5a2-613b5ec516f6

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/2" \
    --header "Authorization: Bearer cZ63eDbd18v64hVagafP5kE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"7584dd9f-e07e-3d20-aae5-20f447df0772\",
    \"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/2"
);

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

let body = {
    "name": "Example Name",
    "category_id": "7584dd9f-e07e-3d20-aae5-20f447df0772",
    "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 cZ63eDbd18v64hVagafP5kE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the document. Example: 2

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: 7584dd9f-e07e-3d20-aae5-20f447df0772

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

document   string     

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "c806b9c6-9a9d-4ddb-8b20-ff0564431fdc",
            "name": "odio",
            "description": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "52a75217-cdca-4546-83a7-87ee8fbb8d0a",
            "name": "consequatur",
            "description": "Asperiores vel voluptate sunt id dolorem enim.",
            "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 EVcv18ae6k5aZdb3DP64gfh

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

sort_by   string  optional    

Field to sort by. Example: created_at

sort_desc   boolean  optional    

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

page   integer  optional    

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

per_page   integer  optional    

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

q   string  optional    

Search query. Example: Manager

Show employee role

requires authentication employee-role show

Show an employee role

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

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


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

Example response (200):


{
    "data": {
        "id": "97299fb1-0e87-4451-89c8-0234ee6b2a7f",
        "name": "quidem",
        "description": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization        

Example: Bearer DVd68ePgcfk6513bvaE4Zah

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: ut

Create employee role

requires authentication employee-role store

Create a new employee role

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: dolorem

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employeeRole   string     

Employee Role UUID Example: repellat

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


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

Example response (200):


{
    "data": [
        {
            "id": "d02ce195-9d83-4c9e-8618-e35e227ff519",
            "name": "Srta. Raysa de Souza",
            "cpf": "607.345.942-17",
            "rg": null,
            "ctps": "005761281",
            "phone": null,
            "birthdate": "2022-08-24T03:00:00.000000Z",
            "email": null,
            "pis_pasep": "79299565838",
            "admission_date": "1982-06-25T03:00:00.000000Z",
            "daily_salary": null,
            "monthly_salary": "6199.34",
            "nationality": "Hungria",
            "place_of_birth": null,
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": null,
                "name": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b1cf5608-d346-48bb-a36d-f6111e61a469",
            "name": "Marcelo Nicolas Gomes Sobrinho",
            "cpf": "430.515.572-60",
            "rg": null,
            "ctps": "624193098",
            "phone": null,
            "birthdate": "2009-01-16T02:00:00.000000Z",
            "email": null,
            "pis_pasep": null,
            "admission_date": null,
            "daily_salary": "448.69",
            "monthly_salary": "2366.22",
            "nationality": null,
            "place_of_birth": "Matias do Leste",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "employee_role": {
                "id": null,
                "name": 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/employees

Headers

Authorization        

Example: Bearer 6Eac1fad3D5bV86hg4vekPZ

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

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


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

Example response (200):


{
    "data": {
        "id": "893a4588-704c-451c-b859-dc61a568e55c",
        "name": "Srta. Olívia Galhardo Molina",
        "cpf": "475.819.781-09",
        "rg": "046044229",
        "ctps": null,
        "phone": "(88) 95807-3286",
        "birthdate": null,
        "email": null,
        "pis_pasep": "69252370996",
        "admission_date": null,
        "daily_salary": "430.68",
        "monthly_salary": "2333.46",
        "nationality": "Ilhas Marshall",
        "place_of_birth": null,
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "employee_role": {
            "id": null,
            "name": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employees/{id}

Headers

Authorization        

Example: Bearer gD3h86Vfvka5bEcPe1Z6ad4

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 11

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 a63vkEV1fg6e8Z4Dhd5bcPa" \
    --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\": \"ffe87bc4-014f-432d-a41f-4a18f8a76930\",
    \"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 a63vkEV1fg6e8Z4Dhd5bcPa",
    "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": "ffe87bc4-014f-432d-a41f-4a18f8a76930",
    "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 a63vkEV1fg6e8Z4Dhd5bcPa

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: ffe87bc4-014f-432d-a41f-4a18f8a76930

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/6" \
    --header "Authorization: Bearer f5DPe8k6chv4gbd63ZaE1Va" \
    --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\": \"ab4b8cb2-91e3-4cca-8f8e-7ab82c5f9895\",
    \"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/6"
);

const headers = {
    "Authorization": "Bearer f5DPe8k6chv4gbd63ZaE1Va",
    "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": "ab4b8cb2-91e3-4cca-8f8e-7ab82c5f9895",
    "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 f5DPe8k6chv4gbd63ZaE1Va

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the employee. Example: 6

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: ab4b8cb2-91e3-4cca-8f8e-7ab82c5f9895

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee   string     

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

List employee bank accounts

requires authentication employee-bank-account index

List all bank accounts for an employee

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 19

employee   string     

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

Create employee bank account

requires authentication employee-bank-account store

Add a bank account to an employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees/18/bank-account" \
    --header "Authorization: Bearer 3vg16fP6ebD458dcaEVZkha" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"consequuntur\",
    \"agency\": \"tcefxxydfutcwx\",
    \"account\": \"g\",
    \"account_type\": \"poupança\",
    \"pix_key\": \"y\",
    \"favorite\": true
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/18/bank-account"
);

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

let body = {
    "bank_id": "consequuntur",
    "agency": "tcefxxydfutcwx",
    "account": "g",
    "account_type": "poupança",
    "pix_key": "y",
    "favorite": true
};

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

Example response (201):



 

Request      

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

Headers

Authorization        

Example: Bearer 3vg16fP6ebD458dcaEVZkha

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 18

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

agency   string     

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

account   string     

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

account_type   string     

Example: poupança

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

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

favorite   boolean  optional    

Example: true

Update employee bank account

requires authentication employee-bank-account update

Update a bank account for an employee

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employees/1/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33" \
    --header "Authorization: Bearer De6d841f3PacbEag5hVZ6kv" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bank_id\": \"et\",
    \"agency\": \"vglezirejmqkfbtbizy\",
    \"account\": \"gqykrglzsrkucqomybr\",
    \"account_type\": \"poupança\",
    \"pix_key\": \"qjfylrbjkhmq\",
    \"favorite\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1/bank-account/019556e7-2e9f-777c-a177-30bbf0646c33"
);

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

let body = {
    "bank_id": "et",
    "agency": "vglezirejmqkfbtbizy",
    "account": "gqykrglzsrkucqomybr",
    "account_type": "poupança",
    "pix_key": "qjfylrbjkhmq",
    "favorite": false
};

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

Request      

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

Headers

Authorization        

Example: Bearer De6d841f3PacbEag5hVZ6kv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 1

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

agency   string  optional    

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

account   string  optional    

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

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

favorite   boolean  optional    

Example: false

Delete employee bank account

requires authentication employee-bank-account delete

Delete a bank account from an employee

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

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

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/1fca6dd5-df17-38cc-9b6a-197e1c9ab12c" \
    --header "Authorization: Bearer ZcahdV6P45vea1gfk8b36DE" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/1fca6dd5-df17-38cc-9b6a-197e1c9ab12c"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 1fca6dd5-df17-38cc-9b6a-197e1c9ab12c

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/209b6208-0e4d-3234-bb5d-0f47fe5587e1/info" \
    --header "Authorization: Bearer ghdaEPa63Df68k5be4v1ZVc" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/209b6208-0e4d-3234-bb5d-0f47fe5587e1/info"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   integer     

Example: 209b6208-0e4d-3234-bb5d-0f47fe5587e1

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/cdbbab5e-f42b-3f2d-83c8-874515ac78d8/download" \
    --header "Authorization: Bearer v3gbafc6VE5Z4ePa68Dhk1d" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/cdbbab5e-f42b-3f2d-83c8-874515ac78d8/download"
);

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

uuid   string     

The UUID of the file to download Example: cdbbab5e-f42b-3f2d-83c8-874515ac78d8

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

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

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 14e3a5VPDadhg6kEvZ86cfb" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"accusantium\",
    \"supplier_id\": \"eum\",
    \"work_id\": \"voluptatum\",
    \"start_date\": \"2026-06-30T09:20:15\",
    \"end_date\": \"2087-03-08\",
    \"per_page\": 4
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/fiscal-documents"
);

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

let body = {
    "q": "accusantium",
    "supplier_id": "eum",
    "work_id": "voluptatum",
    "start_date": "2026-06-30T09:20:15",
    "end_date": "2087-03-08",
    "per_page": 4
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "nfe_access_key": null,
            "nfe_number": null,
            "nfe_series": null,
            "issue_date": null,
            "total_value": null,
            "emit": {
                "cnpj": null,
                "name": null
            },
            "dest": {
                "document": null,
                "name": null
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        },
        {
            "id": null,
            "nfe_access_key": null,
            "nfe_number": null,
            "nfe_series": null,
            "issue_date": null,
            "total_value": null,
            "emit": {
                "cnpj": null,
                "name": null
            },
            "dest": {
                "document": null,
                "name": null
            },
            "financial_status": "pending",
            "products_imported_at": null,
            "created_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 15,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/fiscal-documents

Headers

Authorization        

Example: Bearer 14e3a5VPDadhg6kEvZ86cfb

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

q   string  optional    

Example: accusantium

supplier_id   string  optional    

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

work_id   string  optional    

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

start_date   string  optional    

O campo value deve ser uma data válida. Example: 2026-06-30T09:20:15

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: 2087-03-08

per_page   integer  optional    

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

Create fiscal document

requires authentication fiscal-documents store

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

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

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

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

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 e8kVEvg35c6DaZ4Ph16dfba

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

s3_file_path   string     

Example: ea

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: accusantium

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

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

let body = {
    "file": {
        "path": "at",
        "name": "esse",
        "extension": "qui"
    }
};

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 Ed6D3chVab8145kgP6Zafev

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: non

Body Parameters

file   object     
path   string     

Example: at

name   string     

Example: esse

extension   string     

Example: qui

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

fiscalDocument   string     

UUID da nota fiscal Example: consectetur

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: doloremque

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

Request      

GET api/imports/{importId}/products

Headers

Authorization        

Example: Bearer 1ak4dacb6DghVZP8fe6v53E

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

importId   string     

Example: velit

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

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/iste/products/link" \
    --header "Authorization: Bearer 6g5vaf8e6E4ZackhP3Dbd1V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mappings\": [
        \"aperiam\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/iste/products/link"
);

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

let body = {
    "mappings": [
        "aperiam"
    ]
};

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 cavEd3PVka4618eh5fZg6Db" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sort_by\": \"dolorem\",
    \"sort_desc\": true,
    \"page\": 85,
    \"per_page\": 2
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/locations/states"
);

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

let body = {
    "sort_by": "dolorem",
    "sort_desc": true,
    "page": 85,
    "per_page": 2
};

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "nihil libero",
            "abbreviation": "PY"
        },
        {
            "id": null,
            "name": "ut animi",
            "abbreviation": "VU"
        }
    ],
    "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 cavEd3PVka4618eh5fZg6Db

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

sort_by   string  optional    

Example: dolorem

sort_desc   boolean  optional    

Example: true

page   integer  optional    

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

per_page   integer  optional    

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

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "East Chaseburgh"
        },
        {
            "id": null,
            "name": "West Jonathon"
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer Vk3Dcbgd51fEaZ466Pv8eah

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 54ghEVPce368fadvDa6b1Zk" \
    --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 54ghEVPce368fadvDa6b1Zk",
    "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 54ghEVPce368fadvDa6b1Zk

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

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

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "e96521ed-fb96-32e8-9934-6f434ce2d657",
            "receipt_number": "REC-0427",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Dr. Quinn Weimann Jr.",
                "document": "114.136.702-94"
            },
            "payment": {
                "amount": 8738.22,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Recusandae repudiandae enim reiciendis quidem modi alias."
            },
            "issuer": {
                "name": "Funk Inc",
                "document": "35.033.702/1358-71"
            },
            "issue": {
                "date": "2026-06-09",
                "city": "Mattiefort",
                "state": "MG"
            },
            "created_by": {
                "id": "a2258f4b-6c0d-4ac0-ad3f-937021b7d251",
                "name": "Cathryn Kshlerin"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "4fd2087e-a765-3f8a-b467-ec0cdbccd40c",
            "receipt_number": "REC-4407",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Travon Paucek",
                "document": "524.994.654-08"
            },
            "payment": {
                "amount": 199.2,
                "amount_in_words": "Valor por extenso de teste",
                "method": "cash",
                "description": "Nostrum eaque officiis numquam dolorum id."
            },
            "issuer": {
                "name": "Blick, Runte and Kshlerin",
                "document": "99.111.090/0640-38"
            },
            "issue": {
                "date": "2026-06-27",
                "city": "South Bethel",
                "state": "PR"
            },
            "created_by": {
                "id": "a2258f4b-7353-40dd-88fe-b89d3b754b69",
                "name": "Emie Hilpert DVM"
            },
            "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 b5e4cgaE361vaDZkfV6hP8d

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

document   string  optional    

Example: reprehenderit

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

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

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

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

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

Request      

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

Headers

Authorization        

Example: Bearer Zf53Pdgbae4VhvacD616Ek8

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

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

Example: false

Show payment receipt

requires authentication payment-receipt show

Show a payment receipt

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


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

Example response (200):


{
    "data": {
        "id": "11126870-23c7-30e3-bbdf-b7c6f28aae8c",
        "receipt_number": "REC-0469",
        "receiver_type": "employee",
        "receiver": {
            "id": null,
            "name": "Mr. Darian Treutel Sr.",
            "document": "841.601.945-60"
        },
        "payment": {
            "amount": 7554.03,
            "amount_in_words": "Valor por extenso de teste",
            "method": "pix",
            "description": "Ipsa error molestiae libero aut."
        },
        "issuer": {
            "name": "Stokes PLC",
            "document": "59.714.345/2261-26"
        },
        "issue": {
            "date": "2026-06-26",
            "city": "Kubburgh",
            "state": "SC"
        },
        "created_by": {
            "id": "a2258f4b-84a3-440e-b665-0357a61ed18c",
            "name": "Garret Terry"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization        

Example: Bearer a3haVDb646Z8ePcfv5dkg1E

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 8ZhDb361v6PadceEg5a4kVf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"42b3e928-c8df-4ee2-b0b4-e367ac86eda0\",
    \"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\": \"21b58c15-8d03-3958-a0d7-56d82aaef1bc\",
    \"bank_account_id\": \"73e6b034-178b-3483-8f40-8de04f2696f1\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "42b3e928-c8df-4ee2-b0b4-e367ac86eda0",
    "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": "21b58c15-8d03-3958-a0d7-56d82aaef1bc",
    "bank_account_id": "73e6b034-178b-3483-8f40-8de04f2696f1"
};

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

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: 42b3e928-c8df-4ee2-b0b4-e367ac86eda0

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: 21b58c15-8d03-3958-a0d7-56d82aaef1bc

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: 73e6b034-178b-3483-8f40-8de04f2696f1

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 fPEvV85dc1a6akg4Dh3e6bZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"cde7eddb-4142-480b-8d31-345a380e8ca2\",
    \"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\": \"abe1e4e6-cb8e-3d12-861b-fbdf778e7e54\",
    \"bank_account_id\": \"d2890a70-334a-3575-8eec-b2119d6f6022\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "cde7eddb-4142-480b-8d31-345a380e8ca2",
    "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": "abe1e4e6-cb8e-3d12-861b-fbdf778e7e54",
    "bank_account_id": "d2890a70-334a-3575-8eec-b2119d6f6022"
};

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 fPEvV85dc1a6akg4Dh3e6bZ

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: cde7eddb-4142-480b-8d31-345a380e8ca2

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: abe1e4e6-cb8e-3d12-861b-fbdf778e7e54

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: d2890a70-334a-3575-8eec-b2119d6f6022

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "4fc3f8a2-3600-3fa2-bbf3-67bd8157a4fa",
            "receipt_number": "REC-5218",
            "receiver_type": "custom",
            "receiver": {
                "id": null,
                "name": "Jessica Kilback",
                "document": "582.645.622-92"
            },
            "payment": {
                "amount": 5945.03,
                "amount_in_words": "Valor por extenso de teste",
                "method": "bank_transfer",
                "description": "Et debitis libero quia incidunt suscipit quasi."
            },
            "issuer": {
                "name": "Mitchell Group",
                "document": "11.022.802/7642-90"
            },
            "issue": {
                "date": "2026-06-16",
                "city": "Lake Claudtown",
                "state": "RJ"
            },
            "created_by": {
                "id": "a2258f4b-a930-45cd-a4bb-a7365b5606b2",
                "name": "Cornell Marks"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "34729d53-24f8-33f6-92d2-812b45112e0c",
            "receipt_number": "REC-1107",
            "receiver_type": "employee",
            "receiver": {
                "id": null,
                "name": "Ms. Edwina Sawayn",
                "document": "292.028.354-16"
            },
            "payment": {
                "amount": 793.07,
                "amount_in_words": "Valor por extenso de teste",
                "method": "pix",
                "description": "Ut nesciunt quaerat ipsum in aut porro iusto sit."
            },
            "issuer": {
                "name": "Bechtelar-Lemke",
                "document": "85.922.590/9784-12"
            },
            "issue": {
                "date": "2026-06-05",
                "city": "Bednarville",
                "state": "MG"
            },
            "created_by": {
                "id": "a2258f4b-abf1-4ff1-8e01-5600da9ec8c3",
                "name": "Ryann Wolff"
            },
            "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 e1664faPE8chvg3VdkbDaZ5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

employee_id   integer     

The ID of the employee. Example: 19

employee   string     

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

Permission Groups

Endpoints for permission groups

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


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

Example response (200):


{
    "data": [
        {
            "id": "20d690b4-941d-3188-ad94-db581c3ba0bd",
            "name": "reiciendis-aut-qui",
            "display_name": "quae doloremque est",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "46e8fed2-aebe-3dc8-af90-64d086bd702f",
            "name": "sed-ducimus-officiis",
            "display_name": "quos eum illo",
            "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 3Ec58Zd6v1hV4gekD6baPaf

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

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

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


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

Example response (200):


{
    "data": {
        "id": "ceeb9a6a-ceec-3f1e-8688-d25251d30c70",
        "name": "totam-dolore",
        "display_name": "error modi ut",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization        

Example: Bearer b83ZfEa64DdhVeck1v5Pag6

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 51kh3ec8gvD6Ea4f6dPaZbV" \
    --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 51kh3ec8gvD6Ea4f6dPaZbV",
    "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 51kh3ec8gvD6Ea4f6dPaZbV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

permissionGroup   integer     

Example: 1

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


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

Example response (200):


{
    "data": [
        {
            "id": "c1802877-3932-3eae-8bed-de86f83fb2a9",
            "name": "Dr. Larissa Thalia Rezende",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "20f1664d-4ca8-3c36-8726-11a07e834cd3",
            "name": "Dr. Emerson Leal Cordeiro 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 cZg1f6843Eha5DVkv6dPbae

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

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


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

Example response (200):


{
    "data": {
        "id": "573015ac-7c99-34ce-ada7-7e4951c841cd",
        "name": "Sr. Lucio Rangel Escobar Jr.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization        

Example: Bearer ahP8edvb4Z5g13ka6ED6cfV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: nobis

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: ratione

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productBrand   string     

Product brand UUID Example: dolorem

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


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

Example response (200):


{
    "data": [
        {
            "id": "d951add8-36f1-36bb-9033-33cb21bb30ff",
            "name": "Dr. Simone Domingues Chaves",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "937cfa1d-f05b-35fd-adaf-0f182b038763",
            "name": "Srta. Ariana Renata Rocha",
            "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 v4DZ6V8gcEh6k5aaefdPb13

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

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


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

Example response (200):


{
    "data": {
        "id": "d79f4e22-7fd9-392c-a67b-8ccf75dac63b",
        "name": "Dr. Lucas Molina Dominato",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization        

Example: Bearer aegD6PaE4Z61v3cdhfb5k8V

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: soluta

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 38PgE6b4cDad5Vh6Zka1vef" \
    --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 38PgE6b4cDad5Vh6Zka1vef",
    "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 38PgE6b4cDad5Vh6Zka1vef

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: qui

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productFamily   string     

Product family UUID Example: corrupti

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 D5bZ3k6a6fvVaEPdecg418h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"q\": \"Example Q\",
    \"work_id\": \"64d75833-15e6-3f77-8f83-fac37b7ee4db\",
    \"user_id\": \"9259cdd3-d259-3fe5-a10a-6a0407c859e5\",
    \"responsible_id\": \"438e5b41-7825-3f30-80ce-a07ed074ee87\",
    \"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 D5bZ3k6a6fvVaEPdecg418h",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "q": "Example Q",
    "work_id": "64d75833-15e6-3f77-8f83-fac37b7ee4db",
    "user_id": "9259cdd3-d259-3fe5-a10a-6a0407c859e5",
    "responsible_id": "438e5b41-7825-3f30-80ce-a07ed074ee87",
    "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": "d31f560d-ff0e-300f-9a59-6b40fe4769be",
            "name": "Quia ut alias ut.",
            "description": null,
            "work": {
                "id": "a2258f4c-4791-4a09-b46a-03803b7906ef",
                "name": "Dr. Eloah Pontes Balestero Sobrinho"
            },
            "user": {
                "id": "a2258f4c-4e6e-4be0-8597-fec9f76221bb",
                "name": "Dr. Fidel McKenzie"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "333777db-025e-3357-821b-2a5fd541b140",
            "name": "In ut voluptatem.",
            "description": null,
            "work": {
                "id": "a2258f4c-5322-498f-959a-4d419d77c880",
                "name": "Dr. Théo Ferraz"
            },
            "user": {
                "id": "a2258f4c-5630-4875-80eb-69605ee677d7",
                "name": "Prof. Ariel Gleichner I"
            },
            "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 D5bZ3k6a6fvVaEPdecg418h

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: 64d75833-15e6-3f77-8f83-fac37b7ee4db

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 9259cdd3-d259-3fe5-a10a-6a0407c859e5

responsible_id   string  optional    

Responsável. The uuid of an existing record in the users table. Example: 438e5b41-7825-3f30-80ce-a07ed074ee87

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

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


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

Example response (200):


{
    "data": {
        "id": "31ae9fb9-7d56-33cf-928c-84f507a17e2b",
        "name": "Incidunt quia doloremque.",
        "description": "Quis dignissimos quo laboriosam aut est. Sunt et sequi ad nisi doloribus facilis. Corporis asperiores sed minus ducimus. Ratione quos molestias est eum.",
        "work": {
            "id": "a2258f4c-607d-438e-8f22-cf33fd292a1c",
            "name": "Lucio Leonardo Cervantes Filho"
        },
        "user": {
            "id": "a2258f4c-6413-4929-a99a-5a5ae7dc5922",
            "name": "Marcelo O'Kon"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 6Zd3he6VbED1ackv4aP5gf8

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: rerum

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/saepe/items" \
    --header "Authorization: Bearer 38VePa1bDfhv6dcZkg645Ea" \
    --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/saepe/items"
);

const headers = {
    "Authorization": "Bearer 38VePa1bDfhv6dcZkg645Ea",
    "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": "12a9fd1b-b352-3546-b277-e65aad383fc9",
            "product": {
                "id": "a2258f4c-7e84-4ebd-b0aa-36a522e02193",
                "name": "Srta. Karina Esteves Vale",
                "code": "PRD-913977",
                "unit": {
                    "id": "a2258f4c-7bd5-405e-beab-889b6381e489",
                    "name": "Sr. Paulo Torres",
                    "abbreviation": "Dr. Katherine Melissa Uchoa Sobrinho"
                }
            },
            "quantity": 498.518,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "92140913-0a2f-33cf-937b-0c9cb4e9a9f1",
            "product": {
                "id": "a2258f4c-901e-4217-bd1b-3f62b1e91510",
                "name": "Suelen Sophia Fernandes",
                "code": "PRD-366703",
                "unit": {
                    "id": "a2258f4c-8eae-45ca-a471-3f8b09aed78b",
                    "name": "Cecília Ramires Marés",
                    "abbreviation": "Marcelo Santana Mendes"
                }
            },
            "quantity": 468.7168,
            "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 38VePa1bDfhv6dcZkg645Ea

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: saepe

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 5DvPVgEbka68Z4f63acedh1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"192fe08b-1650-31c0-b275-b193b11177c6\",
    \"items\": [
        {
            \"product_id\": \"9af2602b-a3d3-30c9-a816-855672f853c3\",
            \"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 5DvPVgEbka68Z4f63acedh1",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "192fe08b-1650-31c0-b275-b193b11177c6",
    "items": [
        {
            "product_id": "9af2602b-a3d3-30c9-a816-855672f853c3",
            "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 5DvPVgEbka68Z4f63acedh1

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: 192fe08b-1650-31c0-b275-b193b11177c6

items   object[]  optional    

Itens.

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 9af2602b-a3d3-30c9-a816-855672f853c3

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/quas" \
    --header "Authorization: Bearer Zkv6P6ceg4h5d8aVED3abf1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"items\": [
        {
            \"id\": \"e64067e4-321a-392f-9cfd-704116f8108c\",
            \"product_id\": \"ea8e6b5d-38b1-33ec-ac84-a164f69e533d\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/quas"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "items": [
        {
            "id": "e64067e4-321a-392f-9cfd-704116f8108c",
            "product_id": "ea8e6b5d-38b1-33ec-ac84-a164f69e533d",
            "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 Zkv6P6ceg4h5d8aVED3abf1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: quas

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: e64067e4-321a-392f-9cfd-704116f8108c

product_id   string     

Produto. The uuid of an existing record in the products table. Example: ea8e6b5d-38b1-33ec-ac84-a164f69e533d

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: dolore

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/veritatis/items" \
    --header "Authorization: Bearer 4fEP5ck6a38VDvZeadb6g1h" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"b0710270-0d04-3ef9-b471-3819f6fbe092\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/veritatis/items"
);

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

let body = {
    "items": [
        {
            "product_id": "b0710270-0d04-3ef9-b471-3819f6fbe092",
            "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 4fEP5ck6a38VDvZeadb6g1h

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: veritatis

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: b0710270-0d04-3ef9-b471-3819f6fbe092

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: aliquam

item   string     

Product Quantity List Item UUID Example: aliquid

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/non/items" \
    --header "Authorization: Bearer fbge61VZvkDd38aEP645cah" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"05014642-8872-37f9-a230-a368c72d90cb\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/non/items"
);

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

let body = {
    "items": [
        "05014642-8872-37f9-a230-a368c72d90cb"
    ]
};

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 fbge61VZvkDd38aEP645cah

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: non

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/accusantium/sync-items" \
    --header "Authorization: Bearer e6ZbDaE3vP4hak6gcf5dV81" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"3f491cc0-1c53-3081-a6c9-681ad801eda5\",
            \"product_id\": \"7cb8c2c9-d0e4-3cb0-bd27-2a0cf5df397c\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-quantity-lists/accusantium/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "3f491cc0-1c53-3081-a6c9-681ad801eda5",
            "product_id": "7cb8c2c9-d0e4-3cb0-bd27-2a0cf5df397c",
            "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 e6ZbDaE3vP4hak6gcf5dV81

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productQuantityList   string     

Product Quantity List UUID Example: accusantium

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: 3f491cc0-1c53-3081-a6c9-681ad801eda5

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 7cb8c2c9-d0e4-3cb0-bd27-2a0cf5df397c

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/recusandae/fulfill" \
    --header "Authorization: Bearer c6kaPEVg5efDa8b6Z1hvd34" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fulfillment_type\": \"Example Fulfillment type\",
    \"stock_id\": \"3565792a-5151-3000-9e89-013b71fa37fd\",
    \"quantity\": 1,
    \"source_stock_id\": \"277b811c-22cc-3cdd-8dfa-08214a0149b4\",
    \"reason\": \"Example Reason\",
    \"origins\": [
        {
            \"supplier_product_id\": \"75326874-79fe-3c7f-b812-953538bbff15\",
            \"quantity\": 1
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/recusandae/fulfill"
);

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

let body = {
    "fulfillment_type": "Example Fulfillment type",
    "stock_id": "3565792a-5151-3000-9e89-013b71fa37fd",
    "quantity": 1,
    "source_stock_id": "277b811c-22cc-3cdd-8dfa-08214a0149b4",
    "reason": "Example Reason",
    "origins": [
        {
            "supplier_product_id": "75326874-79fe-3c7f-b812-953538bbff15",
            "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 c6kaPEVg5efDa8b6Z1hvd34

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: recusandae

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: 3565792a-5151-3000-9e89-013b71fa37fd

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: 277b811c-22cc-3cdd-8dfa-08214a0149b4

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: 75326874-79fe-3c7f-b812-953538bbff15

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

const headers = {
    "Authorization": "Bearer 3Z84Dgav6e1Pdf5kEVcbh6a",
    "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": "d89a9ff5-403c-3ce9-a287-22e4321496fc",
            "quantity": 8.6692,
            "fulfilled_at": "2026-06-17T08:14:12.000000Z",
            "created_at": null
        },
        {
            "id": "2ca8bb3d-e88e-3199-b1a3-9db5149b50a2",
            "quantity": 70.8522,
            "fulfilled_at": "2026-06-06T11:51:30.000000Z",
            "created_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/product-requests/items/{item}/fulfillments

Headers

Authorization        

Example: Bearer 3Z84Dgav6e1Pdf5kEVcbh6a

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

item   string     

Product Request Item UUID Example: suscipit

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

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


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

Example response (200):


{
    "data": {
        "id": "d6e96c3f-6831-34e6-b803-e0ca3c6cad0c",
        "product": {
            "id": "a2258f50-4728-4950-a30b-387a5763a236",
            "name": "Srta. Natália Lidiane Rocha",
            "code": "PRD-268318",
            "unit": {
                "id": "a2258f50-45be-4e15-94bd-4acc488a06a0",
                "name": "Dr. Luan Torres",
                "abbreviation": "Renata Maria Padilha Sobrinho"
            }
        },
        "quantity": 310.7457,
        "quantity_fulfilled": 0,
        "quantity_pending": 310.7457,
        "is_fulfilled": false,
        "is_partially_fulfilled": false,
        "observation": "Optio occaecati totam odio qui nihil qui consectetur.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization        

Example: Bearer 6b486EPfa1ehav3Dkcdg5ZV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: ad

item   string     

Product Request Item UUID Example: voluptatem

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/consequatur/pending-items" \
    --header "Authorization: Bearer 5V1g3a6d6ZeDfka8hP4cvbE" \
    --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/consequatur/pending-items"
);

const headers = {
    "Authorization": "Bearer 5V1g3a6d6ZeDfka8hP4cvbE",
    "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": "8d8c665c-d686-380e-b536-9227ca03e100",
            "product": {
                "id": "a2258f50-5f2a-4580-82f6-2587acd19511",
                "name": "Eloah Gil Pontes",
                "code": "PRD-787472",
                "unit": {
                    "id": "a2258f50-5de4-4f9a-80eb-9528a990e8a8",
                    "name": "Rafael Espinoza Dias Sobrinho",
                    "abbreviation": "Sr. Anderson Andres Ortega Neto"
                }
            },
            "quantity": 461.5064,
            "quantity_fulfilled": 0,
            "quantity_pending": 461.5064,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "2f1763d4-27f9-37e2-81a6-82d9753e356a",
            "product": {
                "id": "a2258f50-7a57-4d55-87c2-e6dd3d0f8b86",
                "name": "Iasmin Galindo",
                "code": "PRD-565882",
                "unit": {
                    "id": "a2258f50-78fe-4675-876e-93cc9d2273f7",
                    "name": "Jefferson Valente Gil",
                    "abbreviation": "Sr. Alonso Murilo Deverso Sobrinho"
                }
            },
            "quantity": 221.7449,
            "quantity_fulfilled": 0,
            "quantity_pending": 221.7449,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Et earum quo temporibus quia unde omnis ex.",
            "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 5V1g3a6d6ZeDfka8hP4cvbE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: consequatur

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "d516f4a9-0f32-3603-b2b9-f41624ff59ad",
            "product": {
                "id": "a2258f50-9006-4543-bf1d-d0436b653104",
                "name": "Luiz Maldonado Jr.",
                "code": "PRD-326323",
                "unit": {
                    "id": "a2258f50-8ebb-49d5-9780-405b2f7246cc",
                    "name": "Sr. Dener Marcelo Leal",
                    "abbreviation": "Sr. Victor Azevedo Beltrão"
                }
            },
            "quantity": 533.138,
            "quantity_fulfilled": 0,
            "quantity_pending": 533.138,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Et officia unde labore qui explicabo magnam.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "20a1ba18-2c30-37bc-aa9c-2767f7116c95",
            "product": {
                "id": "a2258f50-a122-4d35-8067-30f49a66be9a",
                "name": "Dr. Vicente Sanches",
                "code": "PRD-902967",
                "unit": {
                    "id": "a2258f50-9ff8-413b-b10a-11072630d24c",
                    "name": "Cláudio César Bezerra",
                    "abbreviation": "Nicolas Manuel Assunção Jr."
                }
            },
            "quantity": 560.5208,
            "quantity_fulfilled": 0,
            "quantity_pending": 560.5208,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Similique natus facilis illum quas cumque alias illo.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

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

Headers

Authorization        

Example: Bearer D68vhga6EZePc3Vfba4k1d5

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: reprehenderit

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 cv466PEagfDaZ5d81hbk3Ve" \
    --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\": \"ffcdf5bb-7fb4-3a05-882d-cbdd5bd5109b\",
    \"work_location_id\": \"96351517-3cdc-37fe-80c9-61f0e92afa35\",
    \"user_id\": \"375140c3-2cbc-355f-a693-b69ea20b634e\",
    \"status_id\": \"5cff9622-ab4a-3c77-9b83-663ab4b44b80\",
    \"priority\": \"Example Priority\",
    \"needed_at_from\": \"Example Needed at from\",
    \"needed_at_to\": \"Example Needed at to\",
    \"responsible_id\": \"290c84fe-4de0-3662-a15e-e09bf22bde3d\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests"
);

const headers = {
    "Authorization": "Bearer cv466PEagfDaZ5d81hbk3Ve",
    "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": "ffcdf5bb-7fb4-3a05-882d-cbdd5bd5109b",
    "work_location_id": "96351517-3cdc-37fe-80c9-61f0e92afa35",
    "user_id": "375140c3-2cbc-355f-a693-b69ea20b634e",
    "status_id": "5cff9622-ab4a-3c77-9b83-663ab4b44b80",
    "priority": "Example Priority",
    "needed_at_from": "Example Needed at from",
    "needed_at_to": "Example Needed at to",
    "responsible_id": "290c84fe-4de0-3662-a15e-e09bf22bde3d"
};

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

Example response (200):


{
    "data": [
        {
            "id": "50b199f8-3d99-306e-96b2-ca027aa72556",
            "code": null,
            "name": "Molestiae voluptatem totam.",
            "description": null,
            "work": {
                "id": "a2258f4d-d303-4360-a729-8091ff135ce0",
                "name": "Dr. Yasmin Galvão"
            },
            "user": {
                "id": "a2258f4d-d677-4536-9154-a4a498c09954",
                "name": "Brian Ullrich"
            },
            "status": {
                "id": "a2258f4d-da2b-483a-8e07-1e935a01fd98",
                "slug": null,
                "name": null,
                "description": "Fabiano Fidalgo Salazar",
                "abbreviation": "cupiditate",
                "color": "#a35461",
                "text_color": "#ea8a53"
            },
            "priority": "medium",
            "priority_label": "Média",
            "needed_at": "2026-07-25",
            "approved_at": null,
            "rejection_reason": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "7197978a-f2df-31b1-87e7-19274c548fd9",
            "code": null,
            "name": "Iste facilis sunt.",
            "description": null,
            "work": {
                "id": "a2258f4d-e1c9-4b2f-8bf0-0aad7293250a",
                "name": "Mel Quintana Paz"
            },
            "user": {
                "id": "a2258f4d-e484-4ec7-8274-49d25b89bc92",
                "name": "Prof. Esta Homenick"
            },
            "status": {
                "id": "a2258f4d-e702-4050-91f2-c43d935e7430",
                "slug": null,
                "name": null,
                "description": "Sra. Fernanda Cortês",
                "abbreviation": "nulla",
                "color": "#a4e3f4",
                "text_color": "#db90cb"
            },
            "priority": "medium",
            "priority_label": "Média",
            "needed_at": "2026-07-15",
            "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 cv466PEagfDaZ5d81hbk3Ve

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: ffcdf5bb-7fb4-3a05-882d-cbdd5bd5109b

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 96351517-3cdc-37fe-80c9-61f0e92afa35

user_id   string  optional    

Usuário. The uuid of an existing record in the users table. Example: 375140c3-2cbc-355f-a693-b69ea20b634e

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 5cff9622-ab4a-3c77-9b83-663ab4b44b80

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: 290c84fe-4de0-3662-a15e-e09bf22bde3d

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

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


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

Example response (200):


{
    "data": {
        "id": "f5a1b4e8-6b68-3a21-b570-1469197e3899",
        "code": null,
        "name": "Numquam occaecati possimus.",
        "description": "Voluptatem consequatur praesentium sit ut vero. Quis omnis quo ratione.",
        "work": {
            "id": "a2258f4d-f1a9-4082-b44c-5c72c8a6c2c1",
            "name": "Caroline Mendes Neto"
        },
        "user": {
            "id": "a2258f4d-f4cc-4f71-a505-2ddc496bc872",
            "name": "Stanley Bayer"
        },
        "status": {
            "id": "a2258f4d-f6a9-4883-a74d-c879db03c40c",
            "slug": null,
            "name": null,
            "description": "Paola Lívia Tamoio",
            "abbreviation": "molestias",
            "color": "#65d7b0",
            "text_color": "#c2d9b7"
        },
        "priority": "high",
        "priority_label": "Alta",
        "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 13PdaZh668fEkgV5cDeva4b

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: eveniet

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/voluptate/items" \
    --header "Authorization: Bearer 56hbeEP8aVgdak3614cDZfv" \
    --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/voluptate/items"
);

const headers = {
    "Authorization": "Bearer 56hbeEP8aVgdak3614cDZfv",
    "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": "30fcf7ef-78af-313b-a901-2f5ac7d93bda",
            "product": {
                "id": "a2258f4e-1867-4d8d-8875-b5ff49012437",
                "name": "Dr. Arthur Fonseca",
                "code": "PRD-904713",
                "unit": {
                    "id": "a2258f4e-1674-452d-8fb2-348b57e8d0ea",
                    "name": "Sra. Amanda Naomi da Silva",
                    "abbreviation": "Rogério Dominato"
                }
            },
            "quantity": 541.9867,
            "quantity_fulfilled": 0,
            "quantity_pending": 541.9867,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "Cupiditate sit odio facilis laborum ut est.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "13dedce5-97c7-38e9-9851-ea7705f36fdc",
            "product": {
                "id": "a2258f4e-2c39-472d-8fbc-5d78fc2f3338",
                "name": "Carlos Deivid Carmona Filho",
                "code": "PRD-311804",
                "unit": {
                    "id": "a2258f4e-2b19-430f-aea7-2dd9a2c9e4ee",
                    "name": "Christopher Velasques Alcantara",
                    "abbreviation": "Dr. Emilly Fidalgo Jr."
                }
            },
            "quantity": 556.7436,
            "quantity_fulfilled": 0,
            "quantity_pending": 556.7436,
            "is_fulfilled": false,
            "is_partially_fulfilled": false,
            "observation": "In vel officia aut maiores quod qui adipisci nostrum.",
            "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 56hbeEP8aVgdak3614cDZfv

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: voluptate

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 Zh68gkfad641eva3bPVE5cD" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"9bb1192c-98d2-3fdc-9c5f-02ac6659372b\",
    \"work_location_id\": \"266a9da4-8344-3d5f-ae89-ef217e733ee2\",
    \"status_id\": \"47eec977-cb43-371d-9038-34936f9d92c8\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"product_id\": \"aaa6e372-e395-3890-b58c-60ef1d4ddd80\",
            \"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 Zh68gkfad641eva3bPVE5cD",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "9bb1192c-98d2-3fdc-9c5f-02ac6659372b",
    "work_location_id": "266a9da4-8344-3d5f-ae89-ef217e733ee2",
    "status_id": "47eec977-cb43-371d-9038-34936f9d92c8",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "product_id": "aaa6e372-e395-3890-b58c-60ef1d4ddd80",
            "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 Zh68gkfad641eva3bPVE5cD

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: 9bb1192c-98d2-3fdc-9c5f-02ac6659372b

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 266a9da4-8344-3d5f-ae89-ef217e733ee2

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: 47eec977-cb43-371d-9038-34936f9d92c8

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: aaa6e372-e395-3890-b58c-60ef1d4ddd80

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/magnam" \
    --header "Authorization: Bearer g6ckb84e1aDPfavV653EdhZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"description\": \"Example Description\",
    \"work_id\": \"d1c3ad0d-ed66-38aa-b46c-bf9619d80af4\",
    \"work_location_id\": \"8129e1c3-2bb2-3c40-9fc4-d7d62e583208\",
    \"status_id\": \"f4bf5fef-376e-3d91-93a9-4e20c779b4da\",
    \"priority\": \"Example Priority\",
    \"needed_at\": \"Example Needed at\",
    \"items\": [
        {
            \"id\": \"0bf2f551-6ecb-3ae7-a0c3-e5112974be17\",
            \"product_id\": \"3dd3f4a4-f353-3591-bec4-cf44d83b46a0\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/magnam"
);

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

let body = {
    "name": "Example Name",
    "description": "Example Description",
    "work_id": "d1c3ad0d-ed66-38aa-b46c-bf9619d80af4",
    "work_location_id": "8129e1c3-2bb2-3c40-9fc4-d7d62e583208",
    "status_id": "f4bf5fef-376e-3d91-93a9-4e20c779b4da",
    "priority": "Example Priority",
    "needed_at": "Example Needed at",
    "items": [
        {
            "id": "0bf2f551-6ecb-3ae7-a0c3-e5112974be17",
            "product_id": "3dd3f4a4-f353-3591-bec4-cf44d83b46a0",
            "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 g6ckb84e1aDPfavV653EdhZ

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: magnam

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: d1c3ad0d-ed66-38aa-b46c-bf9619d80af4

work_location_id   string  optional    

Local da obra. The uuid of an existing record in the work_locations table. Example: 8129e1c3-2bb2-3c40-9fc4-d7d62e583208

status_id   string  optional    

Status. The uuid of an existing record in the statuses table. Example: f4bf5fef-376e-3d91-93a9-4e20c779b4da

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: 0bf2f551-6ecb-3ae7-a0c3-e5112974be17

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 3dd3f4a4-f353-3591-bec4-cf44d83b46a0

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: nihil

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: sed

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: eius

Body Parameters

reason   string     

Motivo da rejeição. O campo value não pode ser superior a 1000 caracteres. Example: Example Reason

Add items to request

requires authentication product-request update

Add one or more product items to the request

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/product-requests/est/items" \
    --header "Authorization: Bearer a36Dh1Z6dVk45f8bPcaevEg" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"product_id\": \"7f6806ff-41bb-381f-a01a-e78c28722689\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/est/items"
);

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

let body = {
    "items": [
        {
            "product_id": "7f6806ff-41bb-381f-a01a-e78c28722689",
            "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 a36Dh1Z6dVk45f8bPcaevEg

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: est

Body Parameters

items   object[]     

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

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 7f6806ff-41bb-381f-a01a-e78c28722689

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/ducimus" \
    --header "Authorization: Bearer vb6dZVa6chPaEeg45f38Dk1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 1,
    \"observation\": \"Example Observation\",
    \"status_id\": \"fa8bfbc1-c5d8-3d6f-972e-69e709d59e5b\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/items/ducimus"
);

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

let body = {
    "quantity": 1,
    "observation": "Example Observation",
    "status_id": "fa8bfbc1-c5d8-3d6f-972e-69e709d59e5b"
};

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 vb6dZVa6chPaEeg45f38Dk1

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the item. Example: ducimus

item   string     

Product Request Item UUID Example: aut

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: fa8bfbc1-c5d8-3d6f-972e-69e709d59e5b

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/rerum/items" \
    --header "Authorization: Bearer 3e5gc8bV1vadh6EZ4Pfka6D" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        \"f3b52ddb-7306-37e2-8677-e77ba9a2a2f3\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/rerum/items"
);

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

let body = {
    "items": [
        "f3b52ddb-7306-37e2-8677-e77ba9a2a2f3"
    ]
};

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: rerum

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/consectetur/sync-items" \
    --header "Authorization: Bearer k6VgZ6D15834aevEPhbcdfa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"items\": [
        {
            \"id\": \"f4155b10-5521-3a29-a873-026ad8567857\",
            \"product_id\": \"546bf911-7c3a-372c-81f7-ec70d28705b5\",
            \"quantity\": 1,
            \"observation\": \"Example Items * observation\"
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-requests/consectetur/sync-items"
);

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

let body = {
    "items": [
        {
            "id": "f4155b10-5521-3a29-a873-026ad8567857",
            "product_id": "546bf911-7c3a-372c-81f7-ec70d28705b5",
            "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 k6VgZ6D15834aevEPhbcdfa

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

productRequest   string     

Product Request UUID Example: consectetur

Body Parameters

items   object[]     

Itens.

id   string  optional    

ID do Item. The uuid of an existing record in the product_request_items table. Example: f4155b10-5521-3a29-a873-026ad8567857

product_id   string     

Produto. The uuid of an existing record in the products table. Example: 546bf911-7c3a-372c-81f7-ec70d28705b5

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


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

Example response (200):


{
    "data": [
        {
            "id": "068e4707-bc63-3344-b1e5-bcff273d8b69",
            "name": "Sr. Leo Pedro Serna Sobrinho",
            "code": "PRD-193496",
            "stock": 864171035,
            "product_family": {
                "id": "a2258f4b-ce68-49ea-834d-1428ee9c83d3",
                "name": "Raysa Salgado"
            },
            "product_brand": {
                "id": "a2258f4b-d30f-435d-a904-5a8b417c88c4",
                "name": "Dr. Renato Robson Esteves Filho"
            },
            "unit": {
                "id": "a2258f4b-d64e-4384-9b17-cbad5f868fc9",
                "name": "Melissa Maraisa Cervantes",
                "abbreviation": "Alice Marin"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Natus corporis dolor repellat voluptate illo maxime.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d5fc63f6-e379-313a-9110-b6c862db71b7",
            "name": "Dr. Luna Milene Padilha Neto",
            "code": "PRD-330954",
            "stock": 99601561,
            "product_family": {
                "id": "a2258f4b-dc87-4e93-83d0-ffaf6a1e8af3",
                "name": "Dr. Cristiano Deverso Neto"
            },
            "product_brand": {
                "id": "a2258f4b-de81-4d61-b414-9b86464bec9a",
                "name": "Sabrina Casanova Ortiz Sobrinho"
            },
            "unit": {
                "id": "a2258f4b-e0a5-4328-b81c-9b30b073c47c",
                "name": "Sra. Raissa Bonilha Sobrinho",
                "abbreviation": "Daiane Laiane Ortega Jr."
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Eligendi porro impedit cum iste.",
            "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 1hEZ6ceb5d38fkVa4vD6agP

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


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

Example response (200):


{
    "data": {
        "id": "2f8023a9-acb8-311d-b356-c582875b40b9",
        "name": "Dr. Mayara Burgos Sobrinho",
        "code": "PRD-657453",
        "stock": 885,
        "product_family": {
            "id": "a2258f4b-ea3f-488d-bb0c-44e9342c835d",
            "name": "Dr. Hernani Gilberto Soares"
        },
        "product_brand": {
            "id": "a2258f4b-ec0c-4e52-8fa9-943f2f091020",
            "name": "Sr. Martinho Lutero Leon"
        },
        "unit": {
            "id": "a2258f4b-edec-49e0-a97f-8596599b7a9f",
            "name": "Sra. Alessandra Juliana Lourenço",
            "abbreviation": "Sra. Valentina Deverso Barros"
        },
        "image": {
            "id": null,
            "url": null
        },
        "description": "Pariatur cumque molestiae omnis magnam nemo ut accusamus rerum.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization        

Example: Bearer h5aEPvVD3ka681edf46Zcbg

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: ipsam

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 D6Z3bEvdf8kcaV5Pha4e1g6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"cd9babda-814e-32fc-83d6-c34235ad54f3\",
    \"product_brand_id\": \"20a09b58-4e48-35e7-896c-42dc7005fa0e\",
    \"unit_id\": \"80df1fe3-d6be-3212-bbea-fe4f13a11cf3\",
    \"description\": \"Example Description\",
    \"stock\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "cd9babda-814e-32fc-83d6-c34235ad54f3",
    "product_brand_id": "20a09b58-4e48-35e7-896c-42dc7005fa0e",
    "unit_id": "80df1fe3-d6be-3212-bbea-fe4f13a11cf3",
    "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 D6Z3bEvdf8kcaV5Pha4e1g6

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: cd9babda-814e-32fc-83d6-c34235ad54f3

product_brand_id   string     

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 20a09b58-4e48-35e7-896c-42dc7005fa0e

unit_id   string     

Unidade. The uuid of an existing record in the units table. Example: 80df1fe3-d6be-3212-bbea-fe4f13a11cf3

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 ae56dEcahk6DfVv31gPb8Z4" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"product_family_id\": \"20ebc6e2-bee1-356a-90e5-138078ec316d\",
    \"product_brand_id\": \"42f7e2ce-afc2-3c0e-ad6d-3aa363fc2790\",
    \"unit_id\": \"bf319981-2bf7-3b56-84eb-30504d72d10a\",
    \"stock\": 1,
    \"description\": \"Example Description\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "Example Name",
    "product_family_id": "20ebc6e2-bee1-356a-90e5-138078ec316d",
    "product_brand_id": "42f7e2ce-afc2-3c0e-ad6d-3aa363fc2790",
    "unit_id": "bf319981-2bf7-3b56-84eb-30504d72d10a",
    "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 ae56dEcahk6DfVv31gPb8Z4

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

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: 20ebc6e2-bee1-356a-90e5-138078ec316d

product_brand_id   string  optional    

Marca do Produto. The uuid of an existing record in the product_brands table. Example: 42f7e2ce-afc2-3c0e-ad6d-3aa363fc2790

unit_id   string  optional    

Unidade. The uuid of an existing record in the units table. Example: bf319981-2bf7-3b56-84eb-30504d72d10a

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

product   string     

Product UUID Example: laboriosam

Reports

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=reprehenderit&type=entrada&description=Tempora+exercitationem+sunt+consequatur+delectus+veniam+accusantium+ducimus.&categories[]=79b72d65-4c47-3277-baec-92a13caedcb5&exclude_categories[]=bf286ed1-d838-332d-be7d-14863ffe55a7&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=4facce11-0b1c-3454-81b2-c4cec6e600a5&customers[]=f454b064-12f5-3385-b782-eac12df3542a&suppliers[]=2e235ed0-2da6-3292-aa02-d93e39ee172d&cash_session=21b44471-885d-35f0-bb15-9a14fde19365&works[]=ede886ae-f086-3b34-b96f-4848eee7d72c" \
    --header "Authorization: Bearer 854bd6PVvgf1D6ZeaEk3cha" \
    --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": "reprehenderit",
    "type": "entrada",
    "description": "Tempora exercitationem sunt consequatur delectus veniam accusantium ducimus.",
    "categories[0]": "79b72d65-4c47-3277-baec-92a13caedcb5",
    "exclude_categories[0]": "bf286ed1-d838-332d-be7d-14863ffe55a7",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "4facce11-0b1c-3454-81b2-c4cec6e600a5",
    "customers[0]": "f454b064-12f5-3385-b782-eac12df3542a",
    "suppliers[0]": "2e235ed0-2da6-3292-aa02-d93e39ee172d",
    "cash_session": "21b44471-885d-35f0-bb15-9a14fde19365",
    "works[0]": "ede886ae-f086-3b34-b96f-4848eee7d72c",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

q   string  optional    

Example: reprehenderit

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: Tempora exercitationem sunt consequatur delectus veniam accusantium ducimus.

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: 21b44471-885d-35f0-bb15-9a14fde19365

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=sit&type=entrada&description=Qui+ea+ab+et+est.&categories[]=4552df3b-089c-38f2-9724-fcae979a677a&exclude_categories[]=bf149914-882d-3cd5-8feb-5532f344abf8&date_start=2026-01-01&date_end=2026-12-31&bank_accounts[]=69f07d79-1bb2-3e96-b674-35d512f93de4&customers[]=356df53a-34fd-3863-ba64-5e1a21d87df3&suppliers[]=d884d85a-379d-317c-9e23-e603a61da575&cash_session=66190da5-1194-33e6-b02c-d80e9988f367&works[]=46274b82-fa0a-3643-808b-69059e5afecc" \
    --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": "sit",
    "type": "entrada",
    "description": "Qui ea ab et est.",
    "categories[0]": "4552df3b-089c-38f2-9724-fcae979a677a",
    "exclude_categories[0]": "bf149914-882d-3cd5-8feb-5532f344abf8",
    "date_start": "2026-01-01",
    "date_end": "2026-12-31",
    "bank_accounts[0]": "69f07d79-1bb2-3e96-b674-35d512f93de4",
    "customers[0]": "356df53a-34fd-3863-ba64-5e1a21d87df3",
    "suppliers[0]": "d884d85a-379d-317c-9e23-e603a61da575",
    "cash_session": "66190da5-1194-33e6-b02c-d80e9988f367",
    "works[0]": "46274b82-fa0a-3643-808b-69059e5afecc",
};
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: sit

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: Qui ea ab et est.

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: 66190da5-1194-33e6-b02c-d80e9988f367

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "86a33bdf-8f54-3b65-add4-81f9daf7a7a9",
            "name": "aut et",
            "slug": null,
            "description": "Non voluptatum omnis esse ducimus. Id aut necessitatibus in harum sint velit labore ipsam. Ut dolor veniam sequi. Dignissimos enim voluptatibus quidem et.",
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "95bc27a4-4412-369a-a576-4554bb0e03d4",
            "name": "qui quibusdam",
            "slug": null,
            "description": "Harum deleniti nisi deserunt consequuntur dolor ratione deleniti. Sint eaque est delectus enim. Maxime ut quidem aut maxime eligendi earum sequi. Ipsam cum velit quis et voluptatum maxime culpa.",
            "abbreviation": "gia",
            "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 3Z46cVfP1kE5ae8ba6dhvgD

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

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

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


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

Example response (200):


{
    "data": {
        "id": "a91a8a28-219c-3f59-847e-aac7176356b8",
        "name": "quibusdam voluptatem",
        "slug": null,
        "description": "Aliquid sint doloribus commodi consequuntur. Voluptatem dolorem ipsa voluptatem animi qui iure dignissimos. Voluptatem impedit qui dolor et. Ut omnis quam quia molestias.",
        "abbreviation": "wso",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization        

Example: Bearer aPhkfvbDd5Ea6eZ86c143gV

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 18

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 2

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the sector. Example: 7

sector   string     

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "f1bd69f2-7d1a-3f1e-a196-1d9e76c6e8ac",
            "name": "Mrs. Earline Stiedemann",
            "username": "mschmitt",
            "email": "dgoyette@example.com",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "234c64bb-cdbe-3279-80d6-e5be1a9bf297",
            "name": "Brett Hermiston",
            "username": "sylvan52",
            "email": "ukemmer@example.net",
            "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 vk5f8P6bEZd4Dhea6gVa31c

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 81caZeg3hP6Ebf5akDv4Vd6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"f8d296da-55ed-30da-ac5f-62d6bc09e603\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "f8d296da-55ed-30da-ac5f-62d6bc09e603"
    ]
};

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 81caZeg3hP6Ebf5akDv4Vd6

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 Vh8d3Dvck1aEPafg465b6Ze" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"04fcdd30-4914-3246-9c1a-1b4ae54150c3\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "04fcdd30-4914-3246-9c1a-1b4ae54150c3"
    ]
};

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 Vh8d3Dvck1aEPafg465b6Ze

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 b3vdf6gVae6chED41aZ85kP" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"9efc6197-fa80-34ea-b728-981b673d570b\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "9efc6197-fa80-34ea-b728-981b673d570b"
    ]
};

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 b3vdf6gVae6chED41aZ85kP

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


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

Example response (200):


{
    "data": [
        {
            "name": "illo corporis",
            "slug": "qui-possimus-corrupti-et-ipsum-possimus-assumenda-dolor"
        },
        {
            "name": "omnis sed",
            "slug": "incidunt-consequatur-voluptatem-ipsa-autem-commodi"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization        

Example: Bearer dVafD1Zv5g4hE6abk68ecP3

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


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

Example response (200):


{
    "data": [
        {
            "id": "32e6b2c5-97ab-339c-bf44-bb6ccdb13cb5",
            "slug": null,
            "name": null,
            "description": "Mel Galhardo Benez Sobrinho",
            "abbreviation": "non",
            "color": "#878b13",
            "text_color": "#9d6c01",
            "module": {
                "name": "Solicitação de Produtos",
                "slug": "product_request"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "1d6f90b7-60bf-36d9-bdfc-48518a678076",
            "slug": null,
            "name": null,
            "description": "Sr. Giovane Vieira",
            "abbreviation": "similique",
            "color": "#9c4d8e",
            "text_color": "#138de9",
            "module": {
                "name": "Obras",
                "slug": "work"
            },
            "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 8v6a5e4a613DZkcVgbfEdhP

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 b1e568d4PZhDf63vVcgakEa" \
    --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\": \"5d4fb59a-0825-39e6-a224-85067289df1f\",
    \"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 b1e568d4PZhDf63vVcgakEa",
    "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": "5d4fb59a-0825-39e6-a224-85067289df1f",
    "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 b1e568d4PZhDf63vVcgakEa

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: 5d4fb59a-0825-39e6-a224-85067289df1f

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


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

Example response (200):


{
    "data": {
        "id": "81556615-1e58-3e57-bdc3-702baf454162",
        "slug": null,
        "name": null,
        "description": "Sr. Wellington Pereira Flores",
        "abbreviation": "atque",
        "color": "#9592ca",
        "text_color": "#2771c5",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization        

Example: Bearer kehZa54P6abfvV6gdc13E8D

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 e5h64k6DPbc18vfdVgEa3Za" \
    --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\": \"eff2a05b-1895-3e9d-bc5e-21f5408efe0f\",
    \"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 e5h64k6DPbc18vfdVgEa3Za",
    "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": "eff2a05b-1895-3e9d-bc5e-21f5408efe0f",
    "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 e5h64k6DPbc18vfdVgEa3Za

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: eff2a05b-1895-3e9d-bc5e-21f5408efe0f

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "d569ac38-d460-3f6d-a6ab-93926c82e893",
            "quantity": 702.9961,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "f74400f7-ccdd-32b1-bc5b-c6e0f2f942ec",
            "quantity": 201.4117,
            "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 53EbDPdfachvZ6ae614Vg8k

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


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

Example response (200):


{
    "data": [
        {
            "id": "66f4966d-f2b1-3fee-9f8b-155648efeef7",
            "name": "Estoque de Freitas Comercial Ltda.",
            "module": "work",
            "is_active": true,
            "is_main": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "8b12d317-af33-3840-91d8-04371d9f8fa8",
            "name": "Estoque Teles-Mascarenhas",
            "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 beakP4acv8VDf3h65EZ1d6g

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 ceavkPZ6g63bdfaV58EhD41" \
    --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 ceavkPZ6g63bdfaV58EhD41",
    "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": "36cce296-4a26-3e11-a867-ea0b169e9de6",
        "name": "Estoque Madeira-da Silva",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

POST api/stocks

Headers

Authorization        

Example: Bearer ceavkPZ6g63bdfaV58EhD41

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


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

Example response (200):


{
    "data": {
        "id": "5d3f700a-2d81-3ac6-90b5-46ccc695acef",
        "name": "Estoque Soares Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/main

Headers

Authorization        

Example: Bearer fa46kZcP86b3e5g1EVdhvDa

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


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

Example response (200):


{
    "data": {
        "id": "cb6aaa77-c9be-3ef1-9dda-c2c8e19c2e11",
        "name": "Estoque Sanches Comercial Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/stocks/{id}

Headers

Authorization        

Example: Bearer 45E8dZhkc1Pgveb3af6Va6D

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 bDc3hfk6P84a5EaeVd1v6Zg" \
    --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 bDc3hfk6P84a5EaeVd1v6Zg",
    "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": "b2546327-2fcf-3562-8351-1a65e3caf8ef",
        "name": "Estoque da Silva Comercial Ltda.",
        "module": "work",
        "is_active": true,
        "is_main": false,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

PUT api/stocks/{id}

Headers

Authorization        

Example: Bearer bDc3hfk6P84a5EaeVd1v6Zg

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "15b771e7-c5cd-31d2-8b05-c3fea095f20f",
            "quantity": 932.8315,
            "min_quantity": null,
            "max_quantity": null,
            "below_minimum": false,
            "above_maximum": false,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "1841b6cb-f78d-3dec-abeb-fede78948a2a",
            "quantity": 716.2444,
            "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 a1evk4PE8cfbV56h3gDda6Z

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

const headers = {
    "Authorization": "Bearer akfPd5V3DaZE41ve68hcb6g",
    "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": "b4677703-e192-350a-86b0-2fc5fdcce5d5",
        "quantity": 998.4097,
        "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 akfPd5V3DaZE41ve68hcb6g

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

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 v31fD45V6PckaghdEeZb8a6" \
    --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 v31fD45V6PckaghdEeZb8a6",
    "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,
        "items_below_minimum": 3,
        "items_above_maximum": 1
    }
}
 

Request      

GET api/stocks/{stock}/summary

Headers

Authorization        

Example: Bearer v31fD45V6PckaghdEeZb8a6

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


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

Example response (200):


{
    "data": [
        {
            "id": "5a2bcf44-43ee-301e-8ee3-d5f3ea7eab37",
            "code": "MOV-970238",
            "type": "ajuste saída",
            "type_name": "ADJUSTMENT_OUT",
            "is_entry": false,
            "is_exit": true,
            "quantity": 38.5866,
            "previous_quantity": 623.2632,
            "new_quantity": 584.6766,
            "reason": "Quis consequatur et excepturi.",
            "movement_date": "2026-06-22T15:37:40.000000Z",
            "created_at": null
        },
        {
            "id": "a485621a-2ae7-3cc0-90e9-38bb5667e185",
            "code": "MOV-704569",
            "type": "consumo",
            "type_name": "CONSUMPTION",
            "is_entry": false,
            "is_exit": true,
            "quantity": 24.2625,
            "previous_quantity": 315.5511,
            "new_quantity": 291.2886,
            "reason": null,
            "movement_date": "2026-06-10T01:11:22.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 Pe51h366k8ZgcDVa4adbvEf

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 df84hP15Ecb63gkvea6aDZV" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"97f034d1-d2a1-3ab2-a170-4949ea0ec100\",
    \"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 df84hP15Ecb63gkvea6aDZV",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "97f034d1-d2a1-3ab2-a170-4949ea0ec100",
    "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": "d359949c-0a8f-3ec0-a429-e0ef67648b4d",
        "code": "MOV-182323",
        "type": "venda",
        "type_name": "SALE",
        "is_entry": false,
        "is_exit": true,
        "quantity": 26.9295,
        "previous_quantity": 595.8326,
        "new_quantity": 568.9031,
        "reason": null,
        "movement_date": "2026-06-03T23:16:48.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock_id}/movements

Headers

Authorization        

Example: Bearer df84hP15Ecb63gkvea6aDZV

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: 97f034d1-d2a1-3ab2-a170-4949ea0ec100

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 aVP3Eh8Dcvd6keZ15ba46gf" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"8cac3f23-a1de-35a7-9338-b6c5d67b479d\",
    \"destination_stock_id\": \"cd1fe56e-c02f-3ea0-ba84-9de7989d53b9\",
    \"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 aVP3Eh8Dcvd6keZ15ba46gf",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "product_id": "8cac3f23-a1de-35a7-9338-b6c5d67b479d",
    "destination_stock_id": "cd1fe56e-c02f-3ea0-ba84-9de7989d53b9",
    "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": "c6da380d-a174-3aa5-a8c7-9841733fb399",
        "code": "MOV-306096",
        "type": "ajuste entrada",
        "type_name": "ADJUSTMENT_IN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 57.5962,
        "previous_quantity": 533.7122,
        "new_quantity": 591.3084,
        "reason": null,
        "movement_date": "2026-06-07T22:00:31.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/transfer

Headers

Authorization        

Example: Bearer aVP3Eh8Dcvd6keZ15ba46gf

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: 8cac3f23-a1de-35a7-9338-b6c5d67b479d

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: cd1fe56e-c02f-3ea0-ba84-9de7989d53b9

quantity   number     

quantidade. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

movement_date   string  optional    

data da movimentação. O campo value deve ser uma data válida. Example: 2024-01-01

Inventory adjustment

requires authentication stock.movement inventory

Performs inventory adjustment to correct stock quantity

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/movements/inventory" \
    --header "Authorization: Bearer Zckbge3Vf54E61h8d6PDaav" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"21cabab4-3803-329f-a468-acf677965561\",
    \"new_quantity\": 1,
    \"reason\": \"Example Reason\",
    \"movement_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/stocks/019556e7-2e9f-777c-a177-30bbf0646c32/movements/inventory"
);

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

let body = {
    "product_id": "21cabab4-3803-329f-a468-acf677965561",
    "new_quantity": 1,
    "reason": "Example Reason",
    "movement_date": "2024-01-01"
};

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

Example response (201):


{
    "data": {
        "id": "db5ba9fb-c6d3-3108-8fa0-9b046fb7c4fc",
        "code": "MOV-944637",
        "type": "entrada transferência",
        "type_name": "TRANSFER_IN",
        "is_entry": true,
        "is_exit": false,
        "quantity": 22.5036,
        "previous_quantity": 528.4239,
        "new_quantity": 550.9275,
        "reason": null,
        "movement_date": "2026-06-07T23:46:16.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stocks/{stock}/movements/inventory

Headers

Authorization        

Example: Bearer Zckbge3Vf54E61h8d6PDaav

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stock   string     

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

Body Parameters

product_id   string     

produto. The uuid of an existing record in the products table. Example: 21cabab4-3803-329f-a468-acf677965561

new_quantity   number     

nova quantidade. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

movement_date   string  optional    

data da movimentação. O campo value deve ser uma data válida. Example: 2024-01-01

Purchase entry

requires authentication stock.movement store

Registers a purchase entry directly into the main stock

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/stock-movements/purchase" \
    --header "Authorization: Bearer d83Zb6DaeVk1f5EaghPvc64" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"product_id\": \"ca0a8909-a11f-375d-b817-4546fa4b274b\",
    \"quantity\": 1,
    \"reason\": \"Example Reason\",
    \"movement_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/stock-movements/purchase"
);

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

let body = {
    "product_id": "ca0a8909-a11f-375d-b817-4546fa4b274b",
    "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": "00dc1cfe-a362-3a85-8b6f-746a4f8bf4a0",
        "code": "MOV-861335",
        "type": "ajuste saída",
        "type_name": "ADJUSTMENT_OUT",
        "is_entry": false,
        "is_exit": true,
        "quantity": 96.2391,
        "previous_quantity": 967.9918,
        "new_quantity": 871.7527,
        "reason": "Pariatur ut debitis fugiat aut.",
        "movement_date": "2026-06-25T19:27:06.000000Z",
        "created_at": null
    }
}
 

Request      

POST api/stock-movements/purchase

Headers

Authorization        

Example: Bearer d83Zb6DaeVk1f5EaghPvc64

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

product_id   string     

produto. The uuid of an existing record in the products table. Example: ca0a8909-a11f-375d-b817-4546fa4b274b

quantity   number     

quantidade. O campo value deve ser pelo menos 0.0001. Example: 1

reason   string  optional    

motivo. O campo value não pode ser superior a 500 caracteres. Example: Example Reason

movement_date   string  optional    

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

Show movement

requires authentication stock.movement index

Returns details of a specific movement

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/stock-movements/019556e7-2e9f-777c-a177-30bbf0646c32" \
    --header "Authorization: Bearer EbefPa5Za31hck4g6dvD86V" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/stock-movements/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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


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

Example response (200):


{
    "data": {
        "id": "8c421f94-8335-3ae5-b7ca-32313dd293b7",
        "code": "MOV-943653",
        "type": "vencido",
        "type_name": "EXPIRED",
        "is_entry": false,
        "is_exit": true,
        "quantity": 13.1155,
        "previous_quantity": 531.809,
        "new_quantity": 518.6935,
        "reason": "Est quaerat cum quia atque provident saepe.",
        "movement_date": "2026-06-20T08:47:01.000000Z",
        "created_at": null
    }
}
 

Request      

GET api/stock-movements/{movement}

Headers

Authorization        

Example: Bearer EbefPa5Za31hck4g6dvD86V

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

movement   string     

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

Suppliers

Endpoints for suppliers

List suppliers

requires authentication suppliers index

List all suppliers

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


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

Example response (200):


{
    "data": [
        {
            "id": "28345234-b23f-3010-909a-e65f5fd481e0",
            "name": "Dr. Joana Gil Saito Neto",
            "email": "toledo.cristovao@example.com",
            "phone": "(68) 2521-6893",
            "document": "86.997.584/0001-37",
            "type": "pj",
            "responsible": "Luana Amaral Camacho",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "7f427917-d126-3553-8f26-69d2790383ef",
            "name": "Violeta Salazar Jr.",
            "email": "graziela58@example.net",
            "phone": "(89) 90987-2491",
            "document": "94.680.601/0001-36",
            "type": "pf",
            "responsible": "Leonardo Godói Vieira Filho",
            "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 hfvbgaa1DP6eE63kdcV58Z4

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

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


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

Example response (200):


{
    "data": {
        "id": "018e7a40-e66e-336b-ac66-0241231fbedd",
        "name": "Aparecida Sepúlveda Escobar",
        "email": "dasilva.sandro@example.org",
        "phone": "(84) 93826-0803",
        "document": "00.961.424/0001-12",
        "type": "pf",
        "responsible": "Guilherme Noel Rezende",
        "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 hdDZcVv34gk6EafaP51e86b

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

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

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "23f5ce99-4308-3247-a463-900de16e7038",
            "name": "Everton Lovato Bittencourt Sobrinho",
            "description": "Est et quia ut occaecati rerum sint asperiores. Incidunt corporis consequatur aspernatur nulla. Qui id esse distinctio nihil aut. Eos aliquam eveniet ab qui hic ut voluptatum.",
            "type": "transferência"
        },
        {
            "id": "73be2a1c-410d-3243-8495-1d44d430f2eb",
            "name": "Silvana Delvalle D'ávila",
            "description": "Nostrum in facere ex vitae soluta eveniet. Repellendus nihil soluta quod libero. Exercitationem at suscipit dolorem fugiat.",
            "type": "saque"
        }
    ],
    "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 DcVe15g6da3f4vEbP6kZ8ah

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

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


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

Example response (200):


{
    "data": {
        "id": "85bbc8f7-9e1a-3aea-8503-883dc2021358",
        "name": "Willian Barros Garcia",
        "description": "Vel delectus eos perspiciatis magnam. Necessitatibus iusto ea porro est ex iure. Quasi libero et esse vel ducimus qui.",
        "type": "transferência"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization        

Example: Bearer 6Pe3vcVdak4hbDZfa8516gE

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: aut

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: veritatis

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

transactionCategory   string     

Transaction category UUID Example: nihil

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


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

Example response (200):


{
    "data": [
        {
            "id": "59d1092a-1509-36d4-bed8-32a8c25795b6",
            "name": "Srta. Heloise Naomi Lira Neto",
            "abbreviation": "Dr. Jácomo Galhardo Fidalgo Filho",
            "description": "Voluptas vel amet dolorem.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ad31b365-376d-3dc5-8635-5821466ce3ef",
            "name": "Dr. Aaron Guilherme Leal",
            "abbreviation": "Eduardo Mário Franco",
            "description": "Quo deserunt commodi porro.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/units

Headers

Authorization        

Example: Bearer 685EZcdg6PDekVav1ah4b3f

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


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

Example response (200):


{
    "data": {
        "id": "d0c01e63-55ef-3894-9f83-e227af1d3150",
        "name": "Lúcia Chaves",
        "abbreviation": "Sra. Alessandra Ferreira Cordeiro Jr.",
        "description": "Illo cumque nulla veritatis.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization        

Example: Bearer gfeak6Z84EahP1cVbdvD653

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

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

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

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

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

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

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

unit   string     

Unit UUID Example: culpa

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


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

Example response (200):


{
    "data": [
        {
            "id": "5eb6593a-e19f-391f-93df-8e7714b7dbbf",
            "name": "Ransom Kuhic",
            "username": "norene18",
            "email": "trever81@example.com",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "adfe28a2-6041-3277-89b1-ab8885a75bab",
            "name": "Durward Nikolaus",
            "username": "bruen.richard",
            "email": "arno27@example.com",
            "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 kVaZ3h6ePg8Ec4f65vDdb1a

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


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

Example response (200):


{
    "data": {
        "id": "cbbfd06c-a16f-35da-9725-5bd56c2e8b73",
        "name": "Jacquelyn Von",
        "username": "eliezer04",
        "email": "lbrakus@example.com",
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization        

Example: Bearer kE3P4abhVcaDv1d8gZ66fe5

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 e1vPDVbacakE8gh3d5f64Z6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"username\": \"abshire.jettie\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"4856f61a-05c5-3386-8312-6c33bcebe0b7\"
    ],
    \"roles\": [
        \"a87ef214-3d96-3387-8ce9-70cfca3e17ae\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "email": "user@example.com",
    "username": "abshire.jettie",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "4856f61a-05c5-3386-8312-6c33bcebe0b7"
    ],
    "roles": [
        "a87ef214-3d96-3387-8ce9-70cfca3e17ae"
    ]
};

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 e1vPDVbacakE8gh3d5f64Z6

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Nome. Example: Example Name

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: abshire.jettie

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 a5a3Ve84gDhbd1vP6Zcf6Ek" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"username\": \"cschaden\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"d0385cbb-05b4-30fc-b44d-2ad316ea7440\"
    ],
    \"roles\": [
        \"8c2a6e38-c06b-3858-80f2-ab52753858ad\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "email": "user@example.com",
    "username": "cschaden",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "d0385cbb-05b4-30fc-b44d-2ad316ea7440"
    ],
    "roles": [
        "8c2a6e38-c06b-3858-80f2-ab52753858ad"
    ]
};

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 a5a3Ve84gDhbd1vP6Zcf6Ek

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

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

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

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

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 43aeZkVcfhd6P8b16DaEgv5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"3fd701f1-0413-37bb-b1d9-8a823dddc91c\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "3fd701f1-0413-37bb-b1d9-8a823dddc91c"
    ]
};

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 43aeZkVcfhd6P8b16DaEgv5

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


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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "voluptatem",
            "display_name": "Quis id mollitia iste accusamus cupiditate nesciunt."
        },
        {
            "id": null,
            "name": "sint",
            "display_name": "Neque aut itaque et quidem quo non."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization        

Example: Bearer Zech53DVv6EgPa86kb4d1af

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


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

Example response (200):


{
    "data": [
        {
            "id": "03207659-d3c5-3a7d-bfed-4e6324580284",
            "description": "Sra. Kamila Valentin",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "53f5b2d9-9af3-39d3-8649-0600257b2bd1",
            "description": "Giovana de Souza Quintana",
            "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 EaD5ekP46bdVgZf1683ahvc

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 gP3d6fE8Dv5eahbZ164ckVa" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"2bfdfbe7-fe92-3369-b04b-842802e51ff4\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Example Description",
    "work_id": "2bfdfbe7-fe92-3369-b04b-842802e51ff4"
};

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 gP3d6fE8Dv5eahbZ164ckVa

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: 2bfdfbe7-fe92-3369-b04b-842802e51ff4

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


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

Example response (200):


{
    "data": {
        "id": "be5b19c4-697b-3b80-9c59-b418a630e966",
        "description": "Luara Aranda Vale Filho",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization        

Example: Bearer P1caVEdek46g3Zbhf6va85D

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 15fE8Pvgada664Vek3cbhDZ" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Example Description\",
    \"work_id\": \"67de87c9-28c0-3dbc-a8d0-487f8c250316\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Example Description",
    "work_id": "67de87c9-28c0-3dbc-a8d0-487f8c250316"
};

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 15fE8Pvgada664Vek3cbhDZ

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: 67de87c9-28c0-3dbc-a8d0-487f8c250316

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "35e278c9-d802-386a-a291-422a942d5b9b",
            "name": "Sra. Luzia Leal Carvalho",
            "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,
            "started_at": {
                "date": "2021-04-26 03:33:11.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "28e617b8-809e-3442-8d23-d954e45248b7",
            "name": "Sr. Agostinho Lovato",
            "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,
            "started_at": {
                "date": "1981-06-04 13:06:16.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 vdD16Eafbh4Vk68ea35cPZg

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 8Eck1VePagDv3a65f4Zbhd6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"07f1bb2f-808e-3f44-bea8-d77dbe4dfc0f\",
    \"status_id\": \"0d249f68-a2ff-3e19-82fe-f003a4a8a149\",
    \"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 8Eck1VePagDv3a65f4Zbhd6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "07f1bb2f-808e-3f44-bea8-d77dbe4dfc0f",
    "status_id": "0d249f68-a2ff-3e19-82fe-f003a4a8a149",
    "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 8Eck1VePagDv3a65f4Zbhd6

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: 07f1bb2f-808e-3f44-bea8-d77dbe4dfc0f

status_id   string     

Status id. The uuid of an existing record in the statuses table. Example: 0d249f68-a2ff-3e19-82fe-f003a4a8a149

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


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

Example response (200):


{
    "data": {
        "id": "466dacb2-74cb-3135-bba6-6caff3cf2bb1",
        "name": "Dr. Allan Tomás Furtado",
        "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,
        "started_at": {
            "date": "2009-08-29 21:38:45.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization        

Example: Bearer af8dD56VeEba1g4vhkcZ3P6

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 4fade5ha3bZ6DvE8g1PckV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"customer_id\": \"a36c30de-e363-3c80-bf2a-bca9cb0b36cd\",
    \"status_id\": \"0bfc78d1-4002-31e7-9ae9-5d286ed9fa6b\",
    \"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 4fade5ha3bZ6DvE8g1PckV6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "customer_id": "a36c30de-e363-3c80-bf2a-bca9cb0b36cd",
    "status_id": "0bfc78d1-4002-31e7-9ae9-5d286ed9fa6b",
    "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 4fade5ha3bZ6DvE8g1PckV6

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: a36c30de-e363-3c80-bf2a-bca9cb0b36cd

status_id   string  optional    

Status id. The uuid of an existing record in the statuses table. Example: 0bfc78d1-4002-31e7-9ae9-5d286ed9fa6b

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

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


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

Example response (200):


{
    "data": [
        {
            "id": "e19b135b-a8ec-3edd-b64d-c5fe0f61e7da",
            "name": "Evalyn Labadie",
            "username": "cjacobs",
            "email": "rau.valentina@example.com",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "c9fe537a-9a29-34e5-9fe4-9b1c490468bc",
            "name": "Roxanne Conroy Jr.",
            "username": "fay.eldred",
            "email": "schumm.ara@example.com",
            "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 VfdZPe4E613avDhga8bck56

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 1VdZa6h3bE68evfcPD4ka5g" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"af77f9a4-26ea-3282-9355-25e7cd23fe04\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

let body = {
    "users": [
        "af77f9a4-26ea-3282-9355-25e7cd23fe04"
    ]
};

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

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 3Ek8a6gacDhbefvVPdZ5146" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"a75dc210-259f-3d27-8e52-a37a2cd3094b\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

let body = {
    "users": [
        "a75dc210-259f-3d27-8e52-a37a2cd3094b"
    ]
};

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

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 6Z1fdckE8vea6ahPg4DbV35" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"008b2adc-e81a-367f-bb90-b43e84521c69\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

let body = {
    "users": [
        "008b2adc-e81a-367f-bb90-b43e84521c69"
    ]
};

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

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.