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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "quidem",
            "display_name": "Qui commodi incidunt iure odit.",
            "permissions_count": null
        },
        {
            "id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
            "name": "modi",
            "display_name": "Nostrum omnis autem et consequatur aut.",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

q   string  optional  

Search query. Example: Role name

Create

requires authentication permission: role store

Create a new role.

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/acl/roles" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "bfc53181-d647-36b2-9080-f9c2b76006f4"
    ]
};

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

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 permission: role update

Update a role.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"display_name\": \"Example Name\",
    \"permissions\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1"
);

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

let body = {
    "name": "Example Name",
    "display_name": "Example Name",
    "permissions": [
        "bfc53181-d647-36b2-9080-f9c2b76006f4"
    ]
};

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "quidem",
        "display_name": "Qui commodi incidunt iure odit.",
        "permissions_count": null
    }
}
 

Request      

GET api/acl/roles/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the role. Example: 1

Role Permissions

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

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "quidem",
            "display_name": "Qui commodi incidunt iure odit."
        },
        {
            "id": null,
            "name": "modi",
            "display_name": "Nostrum omnis autem et consequatur aut."
        }
    ]
}
 

Request      

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

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

role   integer   

The role. Example: 1

Delete

requires authentication permission: role delete

Delete a role.

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/acl/roles/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "distinctio",
            "display_name": "Aut aut harum consequatur aliquam voluptatum est."
        },
        {
            "id": null,
            "name": "sint",
            "display_name": "Itaque nulla eveniet omnis dolor quia."
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/acl/permissions

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

q   string  optional  

Search query. Example: Permission name

Create

requires authentication permission: permission store

Create a new permission.

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

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: permission update

Update a permission.

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/acl/permissions/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

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

Example response (200):


{
    "data": {
        "id": null,
        "name": "quidem",
        "display_name": "Qui commodi incidunt iure odit."
    }
}
 

Request      

GET api/acl/permissions/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the permission. Example: 1

Delete

requires authentication permission: permission delete

Delete a permission.

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/acl/permissions/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "type": "saída",
            "payment_method": "cheque",
            "amount": 6092.26,
            "due_date": "2025-11-30T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "description": "Iure odit et et modi ipsum nostrum omnis autem et consequatur aut dolores.",
            "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": "enim",
            "field2": 62,
            "field3": true,
            "notes": "Veniam corporis dolorem mollitia.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0733da06-3f67-3b0d-b923-684c336397e5",
            "type": "saída",
            "payment_method": "boleto",
            "amount": 8204.46,
            "due_date": "2025-11-30T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "description": "Fugit qui repudiandae laboriosam est alias tenetur ratione nemo voluptate.",
            "is_recurring": null,
            "recurrence_config": null,
            "parent_id": null,
            "recurrence_order": 1,
            "total_recurrences": null,
            "children_count": 0,
            "remaining_recurrences": null,
            "has_children": false,
            "field1": "accusamus",
            "field2": 84,
            "field3": true,
            "notes": "Modi rerum ex repellendus assumenda et tenetur.",
            "created_at": null,
            "updated_at": null
        }
    ]
}
 

Request      

GET api/accounts-payable-receivable/reminders

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Mark reminders as read

requires authentication permission: 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[]=architecto" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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]": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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.

List accounts payable receivable

requires authentication permission: 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?sortBy=created_at&sortDesc=1&q=Salary&type=entrada&customers[]=architecto&suppliers[]=architecto&statuses[]=recebido&payment_method=cheque&date_start=2023-01-01&date_end=2023-12-31&has_children=&is_recurring=" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Salary",
    "type": "entrada",
    "customers[0]": "architecto",
    "suppliers[0]": "architecto",
    "statuses[0]": "recebido",
    "payment_method": "cheque",
    "date_start": "2023-01-01",
    "date_end": "2023-12-31",
    "has_children": "0",
    "is_recurring": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "a4855dc5-0acb-33c3-b921-f4291f719ca0",
            "type": "saída",
            "payment_method": "cheque",
            "amount": 5750.1,
            "due_date": "2025-12-13T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "description": "Sunt nihil accusantium harum mollitia modi deserunt aut.",
            "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": "ab",
            "field2": 49,
            "field3": true,
            "notes": "Iure odit et et modi ipsum nostrum omnis.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "59183559-65ff-3076-b8ca-d2d03d26a42a",
            "type": "entrada",
            "payment_method": "boleto",
            "amount": 8676.17,
            "due_date": "2025-12-10T03:00:00.000000Z",
            "status": null,
            "payment_date": null,
            "description": "Quis adipisci molestias fugit deleniti distinctio eum doloremque id aut libero.",
            "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": "aliquam",
            "field2": 75,
            "field3": true,
            "notes": "Mollitia deleniti nemo odit quia officia.",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Salary

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.

statuses   string[]  optional  
Must be one of:
  • a vencer
  • pago
  • vencido
  • recebido
  • cancelado
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

has_children   boolean  optional  

Filter accounts that have recurring children. Example: false

is_recurring   boolean  optional  

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

Create accounts payable receivable

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\",
    \"customer_id\": \"c71cb930-01f3-381c-9172-e1c70e63388f\",
    \"status\": \"Example Status\",
    \"custom_fields\": [
        \"example1\",
        \"example2\"
    ],
    \"is_recurring\": false,
    \"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 6g43cv8PD1aE5beadkZfhV6",
    "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": "bfc53181-d647-36b2-9080-f9c2b76006f4",
    "customer_id": "c71cb930-01f3-381c-9172-e1c70e63388f",
    "status": "Example Status",
    "custom_fields": [
        "example1",
        "example2"
    ],
    "is_recurring": false,
    "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 6g43cv8PD1aE5beadkZfhV6

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: bfc53181-d647-36b2-9080-f9c2b76006f4

customer_id   string  optional  

Cliente. The uuid of an existing record in the customers table. Example: c71cb930-01f3-381c-9172-e1c70e63388f

status   string  optional  

Status. Example: Example Status

Must be one of:
  • a vencer
  • pago
  • vencido
  • recebido
  • cancelado
custom_fields   object  optional  

Custom fields.

is_recurring   boolean  optional  

Is recurring. Example: false

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

Get accounts payable receivable

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "type": "saída",
        "payment_method": "cheque",
        "amount": 6092.26,
        "due_date": "2025-11-30T03:00:00.000000Z",
        "status": null,
        "payment_date": null,
        "description": "Iure odit et et modi ipsum nostrum omnis autem et consequatur aut dolores.",
        "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": "enim",
        "field2": 62,
        "field3": true,
        "notes": "Veniam corporis dolorem mollitia.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

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

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

accountPayableReceivable   string   

Example: architecto

Update accounts payable receivable

requires authentication permission: 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/architecto" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\",
    \"customer_id\": \"c71cb930-01f3-381c-9172-e1c70e63388f\",
    \"status\": \"Example Status\",
    \"payment_date\": \"2024-01-01\",
    \"custom_fields\": [
        \"example1\",
        \"example2\"
    ],
    \"is_recurring\": false,
    \"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/architecto"
);

const headers = {
    "Authorization": "Bearer 6g43cv8PD1aE5beadkZfhV6",
    "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": "bfc53181-d647-36b2-9080-f9c2b76006f4",
    "customer_id": "c71cb930-01f3-381c-9172-e1c70e63388f",
    "status": "Example Status",
    "payment_date": "2024-01-01",
    "custom_fields": [
        "example1",
        "example2"
    ],
    "is_recurring": false,
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

accountPayableReceivable   string   

Example: architecto

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: bfc53181-d647-36b2-9080-f9c2b76006f4

customer_id   string  optional  

Customer id. The uuid of an existing record in the customers table. Example: c71cb930-01f3-381c-9172-e1c70e63388f

status   string  optional  

Status. Example: Example Status

Must be one of:
  • a vencer
  • pago
  • vencido
  • recebido
  • cancelado
payment_date   string  optional  

Payment date. O campo value deve ser uma data vΓ‘lida. Example: 2024-01-01

custom_fields   object  optional  

Custom fields.

is_recurring   boolean  optional  

Is recurring. Example: false

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

accountPayableReceivable   string   

Example: architecto

Authentication

Endpoints for authentication

Login

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

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

let body = {
    "email": "gbailey@example.net",
    "password": "password"
};

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

Example response (200):


{
    "token": "string"
}
 

Request      

POST api/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Example: gbailey@example.net

password   string   

User password. Example: password

Me

requires authentication

Get the current user

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Miss Pearl Hauck",
        "username": "pfritsch",
        "email": "leo34@example.net",
        "ability": [
            {
                "action": "read",
                "subject": "Auth"
            },
            {
                "action": "listar",
                "subject": "padrão"
            }
        ],
        "roles": [],
        "preferences": [],
        "sectors": [],
        "image": {
            "id": null,
            "url": null
        }
    }
}
 

Request      

GET api/auth/user

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Update Profile

requires authentication

Update the current user profile

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/auth/user" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"username\": \"christian51\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"3457a2ff-ae91-3fa6-b7ef-d2a3b0cb075b\"
    ],
    \"roles\": [
        \"3637ab3b-64aa-3e77-a6a7-c306cb6519a5\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/user"
);

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

let body = {
    "name": "Example Name",
    "email": "user@example.com",
    "username": "christian51",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "3457a2ff-ae91-3fa6-b7ef-d2a3b0cb075b"
    ],
    "roles": [
        "3637ab3b-64aa-3e77-a6a7-c306cb6519a5"
    ]
};

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

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

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

Logout the current user

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Get user preferences

requires authentication

Get all user preferences

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/auth/preferences" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Set user preference

requires authentication

Set or update a user preference

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/auth/preferences" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"key\": \"b\",
    \"value\": []
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/auth/preferences"
);

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

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

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

value   object   

Delete user preference

requires authentication

Delete a specific user preference

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

key   string   

Example: architecto

Bank Accounts

Endpoints for bank accounts

Get bank account balance summary

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

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

Example response (200):


{
    "data": {
        "totalBalancePositive": "number",
        "totalBalanceNegative": "number",
        "totalLimit": "number",
        "sumLimitAndBalancePositive": "number",
        "accounts": {
            "*": {
                "id": "string",
                "bank": "string",
                "balance": "number",
                "limit": "number"
            }
        }
    }
}
 

Request      

GET api/bank-accounts/balance-summary

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

List bank accounts

requires authentication permission: bank-account index

List all bank accounts

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/bank-accounts?sortBy=created_at&sortDesc=1&q=name" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "name",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "agency": "0949",
            "account": "2170043-2",
            "type": "poupança",
            "balance": 4254.04,
            "holder_type": "pf",
            "alias": "iure",
            "limit": 1223.92,
            "bank": {
                "id": null,
                "name": null,
                "code": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
            "agency": "1627",
            "account": "5913505-2",
            "type": "corrente",
            "balance": 442.88,
            "holder_type": "pf",
            "alias": "et",
            "limit": 4927.89,
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: name

Create bank account

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"2170043-2\",
    \"bank_id\": \"fa253524-dd6a-3fdb-a788-0cabcf134db7\",
    \"type\": \"Example Type\",
    \"holder_type\": \"Example Holder type\",
    \"alias\": \"Example Alias\",
    \"balance\": 1,
    \"limit\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts"
);

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

let body = {
    "agency": "Example Agency",
    "account": "2170043-2",
    "bank_id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
    "type": "Example Type",
    "holder_type": "Example Holder type",
    "alias": "Example Alias",
    "balance": 1,
    "limit": 1
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

agency   string   

Agency. Example: Example Agency

account   string   

Account. Example: 2170043-2

bank_id   string   

Bank id. The uuid of an existing record in the banks table. Example: fa253524-dd6a-3fdb-a788-0cabcf134db7

type   string   

Type. Example: Example Type

Must be one of:
  • corrente
  • poupanΓ§a
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

Update bank account

requires authentication permission: bank-account update

Update a bank account

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"agency\": \"Example Agency\",
    \"account\": \"2170043-2\",
    \"bank_id\": \"fa253524-dd6a-3fdb-a788-0cabcf134db7\",
    \"type\": \"Example Type\",
    \"holder_type\": \"Example Holder type\",
    \"alias\": \"Example Alias\",
    \"balance\": 1,
    \"limit\": 1
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/bank-accounts/1"
);

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

let body = {
    "agency": "Example Agency",
    "account": "2170043-2",
    "bank_id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
    "type": "Example Type",
    "holder_type": "Example Holder type",
    "alias": "Example Alias",
    "balance": 1,
    "limit": 1
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

bankAccount   integer   

Example: 1

Body Parameters

agency   string  optional  

Agency. Example: Example Agency

account   string  optional  

Account. Example: 2170043-2

bank_id   string  optional  

Bank id. The uuid of an existing record in the banks table. Example: fa253524-dd6a-3fdb-a788-0cabcf134db7

type   string  optional  

Type. Example: Example Type

Must be one of:
  • corrente
  • poupanΓ§a
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

Show bank account

requires authentication permission: bank-account show

Show a bank account

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "agency": "0949",
        "account": "2170043-2",
        "type": "poupança",
        "balance": 4254.04,
        "holder_type": "pf",
        "alias": "iure",
        "limit": 1223.92,
        "bank": {
            "id": null,
            "name": null,
            "code": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/bank-accounts/{bankAccount}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

bankAccount   integer   

Example: 1

Delete bank account

requires authentication permission: bank-account delete

Delete a bank account

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

bankAccount   integer   

Example: 1

Banks

Endpoints for banks

List banks

requires authentication permission: bank index

List all banks

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/banks?sortBy=created_at&sortDesc=1&q=Permission+name" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/banks"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Permission name",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Cortês Comercial Ltda.",
            "code": "881"
        },
        {
            "id": "0a9446d3-4070-3757-8926-67a9d2adbc0e",
            "name": "Urias e Caldeira",
            "code": "744"
        }
    ],
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Permission name

Create bank

requires authentication permission: bank store

Create a new bank

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

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 permission: bank update

Update a bank

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/banks/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: bank show

Show a bank

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Cortês Comercial Ltda.",
        "code": "881"
    }
}
 

Request      

GET api/banks/{bank}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

bank   integer   

The bank. Example: 1

Delete bank

requires authentication permission: bank delete

Delete a bank

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/banks/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

bank   integer   

The bank. Example: 1

CEP

Search CEP

requires authentication

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

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 permission: cash-flow summary

Get cash flow summary

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cash-flows/summary?sortBy=created_at&sortDesc=1&q=Salary&cash_session=uuid&type=entrada&description=Eius+et+animi+quos+velit+et.&categories[]=architecto&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=architecto&customers[]=architecto&suppliers[]=architecto&works[]=architecto" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Salary",
    "cash_session": "uuid",
    "type": "entrada",
    "description": "Eius et animi quos velit et.",
    "categories[0]": "architecto",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "architecto",
    "customers[0]": "architecto",
    "suppliers[0]": "architecto",
    "works[0]": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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

Description . Example: Eius et animi quos velit et.

categories   string[]  optional  

The uuid of an existing record in the transaction_categories table.

date_start   string  optional  

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

date_end   string  optional  

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

bank_accounts   string[]  optional  

The uuid of an existing record in the bank_accounts table.

customers   string[]  optional  

The uuid of an existing record in the customers table.

suppliers   string[]  optional  

The uuid of an existing record in the suppliers table.

works   string[]  optional  

The uuid of an existing record in the works table.

List cash flow

requires authentication permission: cash-flow index

List all cash flow

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/cash-flows?sortBy=created_at&sortDesc=1&q=Salary&cash_session=uuid&type=entrada&description=Eius+et+animi+quos+velit+et.&categories[]=architecto&date_start=2021-01-01&date_end=2021-01-31&bank_accounts[]=architecto&customers[]=architecto&suppliers[]=architecto&works[]=architecto" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Salary",
    "cash_session": "uuid",
    "type": "entrada",
    "description": "Eius et animi quos velit et.",
    "categories[0]": "architecto",
    "date_start": "2021-01-01",
    "date_end": "2021-01-31",
    "bank_accounts[0]": "architecto",
    "customers[0]": "architecto",
    "suppliers[0]": "architecto",
    "works[0]": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "a4855dc5-0acb-33c3-b921-f4291f719ca0",
            "type": "tarifa",
            "amount": -8754.55,
            "description": "Et fugiat sunt nihil accusantium.",
            "transaction_date": "1990-07-03T03:00:00.000000Z",
            "transaction_category": {
                "id": null,
                "name": null,
                "type": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "cd1eb1ea-4697-3b9a-9dd0-988044a83af6",
            "type": "entrada",
            "amount": 6303.26,
            "description": "Provident perspiciatis quo omnis nostrum aut adipisci quidem.",
            "transaction_date": "2015-01-19T02: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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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

Description . Example: Eius et animi quos velit 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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\",
    \"transaction_category_id\": \"fa253524-dd6a-3fdb-a788-0cabcf134db7\",
    \"bank_account_id\": \"45d1e1f4-e38d-3971-92c7-6d933b3b67fa\",
    \"customer_id\": \"8c352249-2535-3e45-8de4-d6620458a778\",
    \"supplier_id\": \"61733391-0acb-3d07-80fa-6a559e639b13\",
    \"work_id\": \"338aa13c-ee9b-3c59-9dad-eeca56f85ba2\",
    \"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 6g43cv8PD1aE5beadkZfhV6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "Example Type",
    "cash_session_id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
    "transaction_category_id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
    "bank_account_id": "45d1e1f4-e38d-3971-92c7-6d933b3b67fa",
    "customer_id": "8c352249-2535-3e45-8de4-d6620458a778",
    "supplier_id": "61733391-0acb-3d07-80fa-6a559e639b13",
    "work_id": "338aa13c-ee9b-3c59-9dad-eeca56f85ba2",
    "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 6g43cv8PD1aE5beadkZfhV6

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
cash_session_id   string   

Cash session id. The uuid of an existing record in the cash_sessions table. Example: bfc53181-d647-36b2-9080-f9c2b76006f4

transaction_category_id   string  optional  

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: fa253524-dd6a-3fdb-a788-0cabcf134db7

bank_account_id   string  optional  

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 45d1e1f4-e38d-3971-92c7-6d933b3b67fa

customer_id   string  optional  

Customer id. The uuid of an existing record in the customers table. Example: 8c352249-2535-3e45-8de4-d6620458a778

supplier_id   string  optional  

Supplier id. The uuid of an existing record in the suppliers table. Example: 61733391-0acb-3d07-80fa-6a559e639b13

work_id   string  optional  

Work id. The uuid of an existing record in the works table. Example: 338aa13c-ee9b-3c59-9dad-eeca56f85ba2

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 permission: cash-flow show

Show a cash flow

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "type": "transferência",
        "amount": -6620.31,
        "description": "Commodi incidunt iure odit.",
        "transaction_date": "1977-08-15T03: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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

cashFlow   integer   

Example: 1

Update cash flow

requires authentication permission: cash-flow update

Update a cash flow

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"Example Type\",
    \"cash_session_id\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\",
    \"transaction_category_id\": \"fa253524-dd6a-3fdb-a788-0cabcf134db7\",
    \"bank_account_id\": \"45d1e1f4-e38d-3971-92c7-6d933b3b67fa\",
    \"customer_id\": \"8c352249-2535-3e45-8de4-d6620458a778\",
    \"supplier_id\": \"61733391-0acb-3d07-80fa-6a559e639b13\",
    \"work_id\": \"338aa13c-ee9b-3c59-9dad-eeca56f85ba2\",
    \"amount\": 1,
    \"description\": \"Example Description\",
    \"transaction_date\": \"2024-01-01\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-flows/1"
);

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

let body = {
    "type": "Example Type",
    "cash_session_id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
    "transaction_category_id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
    "bank_account_id": "45d1e1f4-e38d-3971-92c7-6d933b3b67fa",
    "customer_id": "8c352249-2535-3e45-8de4-d6620458a778",
    "supplier_id": "61733391-0acb-3d07-80fa-6a559e639b13",
    "work_id": "338aa13c-ee9b-3c59-9dad-eeca56f85ba2",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

cashFlow   integer   

Example: 1

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

Cash session id. The uuid of an existing record in the cash_sessions table. Example: bfc53181-d647-36b2-9080-f9c2b76006f4

transaction_category_id   string  optional  

Transaction category id. The uuid of an existing record in the transaction_categories table. Example: fa253524-dd6a-3fdb-a788-0cabcf134db7

bank_account_id   string  optional  

Bank account id. The uuid of an existing record in the bank_accounts table. Example: 45d1e1f4-e38d-3971-92c7-6d933b3b67fa

customer_id   string  optional  

Customer id. The uuid of an existing record in the customers table. Example: 8c352249-2535-3e45-8de4-d6620458a778

supplier_id   string  optional  

Supplier id. The uuid of an existing record in the suppliers table. Example: 61733391-0acb-3d07-80fa-6a559e639b13

work_id   string  optional  

Work id. The uuid of an existing record in the works table. Example: 338aa13c-ee9b-3c59-9dad-eeca56f85ba2

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 permission: cash-flow delete

Delete a cash flow

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

cashFlow   integer   

Example: 1

Cash Session

Endpoints for cash session

List cash session

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "opened_by": null,
            "opened_at": "2023-05-15T14:37:50.000000Z",
            "closed_by": null,
            "closed_at": "2020-05-23T06:21:42.000000Z",
            "opening_balance": 3669.26,
            "closing_balance": 6620.31,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "created_at": "1983-05-17T03:07:42.000000Z",
            "updated_at": "1990-07-05T09:27:10.000000Z"
        },
        {
            "id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
            "opened_by": null,
            "opened_at": "2019-04-24T14:23:29.000000Z",
            "closed_by": null,
            "closed_at": "2009-07-27T04:40:06.000000Z",
            "opening_balance": 8853.25,
            "closing_balance": 275.37,
            "total_income": 0,
            "total_expense": 0,
            "total_balance": 0,
            "status": "Fechado",
            "created_at": "2003-07-15T08:01:07.000000Z",
            "updated_at": "2019-08-30T13:55:51.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/cash-sessions

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Open cash session

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "opened_by": null,
        "opened_at": "2023-05-15T14:37:50.000000Z",
        "closed_by": null,
        "closed_at": "2020-05-23T06:21:42.000000Z",
        "opening_balance": 3669.26,
        "closing_balance": 6620.31,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "created_at": "1983-05-17T03:07:42.000000Z",
        "updated_at": "1990-07-05T09:27:10.000000Z"
    }
}
 

Request      

POST api/cash-sessions/open

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Close cash session

requires authentication permission: cash-session close

Close a cash session

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/6ff8f7f6-1eb3-3525-be4a-3932c805afed" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/cash-sessions/close/6ff8f7f6-1eb3-3525-be4a-3932c805afed"
);

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

uuid   string   

Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Show cash session

requires authentication permission: cash-session show

Show a cash session

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "opened_by": null,
        "opened_at": "2023-05-15T14:37:50.000000Z",
        "closed_by": null,
        "closed_at": "2020-05-23T06:21:42.000000Z",
        "opening_balance": 3669.26,
        "closing_balance": 6620.31,
        "total_income": 0,
        "total_expense": 0,
        "total_balance": 0,
        "status": "Fechado",
        "created_at": "1983-05-17T03:07:42.000000Z",
        "updated_at": "1990-07-05T09:27:10.000000Z"
    }
}
 

Request      

GET api/cash-sessions/{uuid}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

uuid   integer   

Example: 1

Delete cash session

requires authentication permission: cash-session delete

Delete a cash session

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

uuid   integer   

Example: 1

Customers

Endpoints for customers

List customers

requires authentication permission: customers index

List all customers

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/customers?sortBy=created_at&sortDesc=1&q=Customer+name" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/customers"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Customer name",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "email": "yohanna44@example.org",
            "phone": "(94) 94866-9606",
            "document": "790.915.066-01",
            "type": "pj",
            "responsible": "Sra. Katherine de Arruda",
            "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": "c71cb930-01f3-381c-9172-e1c70e63388f",
            "name": "Liz Sueli Pacheco Neto",
            "email": "jrosa@example.net",
            "phone": "(49) 3996-5127",
            "document": "869.737.788-95",
            "type": "pf",
            "responsible": "Sr. Rodrigo Gil",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Customer name

Create customer

requires authentication permission: customers store

Create a new customer

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

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 permission: customers index

Get a customer

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "email": "yohanna44@example.org",
        "phone": "(94) 94866-9606",
        "document": "790.915.066-01",
        "type": "pj",
        "responsible": "Sra. Katherine de Arruda",
        "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the customer. Example: 1

customer   string   

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

Update customer

requires authentication permission: customers update

Update a customer

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/customers/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"phone\": \"(11) 99999-9999\",
    \"document\": \"Example Document\",
    \"type\": \"Example Type\",
    \"responsible\": \"Example Responsible\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"address\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"street\": \"Example Address street\",
        \"number\": \"Example Address number\",
        \"complement\": \"Example Address complement\",
        \"neighborhood\": \"Example Address neighborhood\",
        \"city\": \"Example Address city\",
        \"state\": \"Example Address state\",
        \"zip_code\": \"Example Address zip code\"
    }
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/customers/1"
);

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the customer. Example: 1

customer   string   

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

Body Parameters

name   string  optional  

Nome. Example: Example Name

email   string  optional  

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

phone   string  optional  

Telefone. Example: (11) 99999-9999

document   string  optional  

CPF/CNPJ. Example: Example Document

type   string  optional  

Tipo. Example: Example Type

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

ResponsΓ‘vel. Example: Example Responsible

image   object  optional  

Imagem.

path   string  optional  

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

name   string  optional  

Nome da imagem. Example: Example Name

extension   string  optional  

ExtensΓ£o da imagem. Example: Example Image extension

size   string  optional  

Tamanho da imagem. Example: Example Image size

address   object  optional  

EndereΓ§o.

street   string  optional  

Rua. Example: Example Address street

number   string  optional  

NΓΊmero. Example: Example Address number

complement   string  optional  

Complemento. Example: Example Address complement

neighborhood   string  optional  

Bairro. Example: Example Address neighborhood

city   string  optional  

Cidade. Example: Example Address city

state   string  optional  

Estado. Example: Example Address state

zip_code   string  optional  

CEP. Example: Example Address zip code

Delete customer

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "description": "Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora.",
            "module": "document"
        },
        {
            "id": "690f4e21-70e0-3516-8ade-d6c679dacb9e",
            "name": "Juliano Cléber Dias Filho",
            "description": "Fugit qui repudiandae laboriosam est alias. Ratione nemo voluptate accusamus ut et recusandae modi rerum. Repellendus assumenda et tenetur ab reiciendis.",
            "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 6g43cv8PD1aE5beadkZfhV6

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 permission: document-category show

Show a document category

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "description": "Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora.",
        "module": "document"
    }
}
 

Request      

GET api/document-categories/{documentCategory}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

documentCategory   string   

Document category UUID Example: architecto

Create document category

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: document-category update

Update a document category

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

documentCategory   string   

Document category UUID Example: architecto

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 permission: document-category delete

Delete a document category

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

documentCategory   string   

Document category UUID Example: architecto

Documents

Endpoints for documents

List documents

requires authentication permission: documents index

List all documents

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/documents?sortBy=created_at&sortDesc=1&q=Document+name&categories[]=architecto&documentable_type=architecto&customers[]=architecto&suppliers[]=architecto" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/documents"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Document name",
    "categories[0]": "architecto",
    "documentable_type": "architecto",
    "customers[0]": "architecto",
    "suppliers[0]": "architecto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "1cb84941-0d38-3f36-a303-52c729118062",
            "name": "Dr. Aline Uchoa Marinho",
            "file": {
                "id": null,
                "url": null,
                "extension": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0aa2596d-721f-3edf-b368-2ae1f0283e9a",
            "name": "Dr. Augusto Serna Filho",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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

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.

Create document

requires authentication permission: documents store

Create a new document

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/documents" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\",
    \"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 6g43cv8PD1aE5beadkZfhV6",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Example Name",
    "category_id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
    "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 6g43cv8PD1aE5beadkZfhV6

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: bfc53181-d647-36b2-9080-f9c2b76006f4

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 permission: documents update

Update a document

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/documents/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"category_id\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\",
    \"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/1"
);

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

let body = {
    "name": "Example Name",
    "category_id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the document. Example: 1

document   string   

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

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: bfc53181-d647-36b2-9080-f9c2b76006f4

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: employee-role index

List all employee roles

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/employee-roles?sortBy=created_at&sortDesc=1&q=Manager" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Manager",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "1a8810c7-a4f4-4b78-86a2-e51fc330acff",
            "name": "aut",
            "description": "Nostrum qui commodi incidunt iure.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "70e60e79-6186-4ed8-b1ae-046e6425860c",
            "name": "odit",
            "description": "Modi ipsum nostrum omnis autem et.",
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/employee-roles

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Manager

Show employee role

requires authentication permission: employee-role show

Show an employee role

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

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

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

Example response (200):


{
    "data": {
        "id": "b634995e-2503-43ac-9e6f-71b9ec450d76",
        "name": "aut",
        "description": "Nostrum qui commodi incidunt iure.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/employee-roles/{employeeRole}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

employeeRole   string   

Employee Role UUID Example: architecto

Create employee role

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employee-roles"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et."
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

description   string  optional  

Example: Eius et animi quos velit et.

Update employee role

requires authentication permission: employee-role update

Update an employee role

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employee-roles/architecto" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employee-roles/architecto"
);

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

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et."
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

employeeRole   string   

Employee Role UUID Example: architecto

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

description   string  optional  

Example: Eius et animi quos velit et.

Delete employee role

requires authentication permission: employee-role delete

Delete an employee role

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

employeeRole   string   

Employee Role UUID Example: architecto

Employees

Endpoints for employees

List employees

requires authentication permission: employee index

List all employees

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

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "JoΓ£o Silva",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "a2359255-77c0-4229-b524-f2d4df1b46ab",
            "name": "Rodrigo Leon",
            "cpf": "421.700.432-81",
            "rg": "590214902",
            "ctps": null,
            "phone": null,
            "birthdate": "1982-08-07",
            "email": "valdez.jacomo@example.org",
            "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": "4d54c222-da9c-4039-ba84-14ec0d21fa0d",
            "name": "Elaine Kamila Serna Neto",
            "cpf": "323.759.947-24",
            "rg": "504415490",
            "ctps": "691282316",
            "phone": "(93) 3757-0170",
            "birthdate": null,
            "email": 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
        }
    ],
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: JoΓ£o Silva

Show employee

requires authentication permission: employee show

Show an employee

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

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

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

Example response (200):


{
    "data": {
        "id": "88a8a182-73e1-4523-825d-a1d22d8fcf28",
        "name": "Rodrigo Leon",
        "cpf": "421.700.432-81",
        "rg": "590214902",
        "ctps": null,
        "phone": null,
        "birthdate": "1982-08-07",
        "email": "valdez.jacomo@example.org",
        "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the employee. Example: 1

employee   string   

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

Create employee

requires authentication permission: employee store

Create a new employee

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/employees" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"cpf\": \"ngzmiyvdljnikh\",
    \"rg\": \"waykcmyuwpwlvqwr\",
    \"ctps\": \"sitcpscqldzsnrwt\",
    \"phone\": \"ujwvlxjklqppwqbe\",
    \"birthdate\": \"2025-11-14T16:40:48\",
    \"email\": \"kutch.cynthia@example.org\",
    \"employee_role_id\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees"
);

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

let body = {
    "name": "b",
    "cpf": "ngzmiyvdljnikh",
    "rg": "waykcmyuwpwlvqwr",
    "ctps": "sitcpscqldzsnrwt",
    "phone": "ujwvlxjklqppwqbe",
    "birthdate": "2025-11-14T16:40:48",
    "email": "kutch.cynthia@example.org",
    "employee_role_id": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

cpf   string   

O campo value deve ser 14 caracteres. Example: ngzmiyvdljnikh

rg   string  optional  

O campo value nΓ£o pode ser superior a 20 caracteres. Example: waykcmyuwpwlvqwr

ctps   string  optional  

O campo value nΓ£o pode ser superior a 20 caracteres. Example: sitcpscqldzsnrwt

phone   string  optional  

O campo value nΓ£o pode ser superior a 20 caracteres. Example: ujwvlxjklqppwqbe

birthdate   string  optional  

O campo value deve ser uma data vΓ‘lida. Example: 2025-11-14T16:40:48

email   string  optional  

O campo value deve ser um endereΓ§o de e-mail vΓ‘lido. Example: kutch.cynthia@example.org

employee_role_id   string   

The uuid of an existing record in the employee_roles table. Example: architecto

address   object  optional  
street   string  optional  
number   string  optional  
complement   string  optional  
neighborhood   string  optional  
city   string  optional  
state   string  optional  
zip_code   string  optional  

Update employee

requires authentication permission: employee update

Update an employee

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/employees/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"cpf\": \"ngzmiyvdljnikh\",
    \"rg\": \"waykcmyuwpwlvqwr\",
    \"ctps\": \"sitcpscqldzsnrwt\",
    \"phone\": \"ujwvlxjklqppwqbe\",
    \"birthdate\": \"2025-11-14T16:40:48\",
    \"email\": \"kutch.cynthia@example.org\",
    \"employee_role_id\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/employees/1"
);

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

let body = {
    "name": "b",
    "cpf": "ngzmiyvdljnikh",
    "rg": "waykcmyuwpwlvqwr",
    "ctps": "sitcpscqldzsnrwt",
    "phone": "ujwvlxjklqppwqbe",
    "birthdate": "2025-11-14T16:40:48",
    "email": "kutch.cynthia@example.org",
    "employee_role_id": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the employee. Example: 1

employee   string   

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

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

cpf   string   

O campo value deve ser 14 caracteres. Example: ngzmiyvdljnikh

rg   string  optional  

O campo value nΓ£o pode ser superior a 20 caracteres. Example: waykcmyuwpwlvqwr

ctps   string  optional  

O campo value nΓ£o pode ser superior a 20 caracteres. Example: sitcpscqldzsnrwt

phone   string  optional  

O campo value nΓ£o pode ser superior a 20 caracteres. Example: ujwvlxjklqppwqbe

birthdate   string  optional  

O campo value deve ser uma data vΓ‘lida. Example: 2025-11-14T16:40:48

email   string  optional  

O campo value deve ser um endereΓ§o de e-mail vΓ‘lido. Example: kutch.cynthia@example.org

employee_role_id   string   

The uuid of an existing record in the employee_roles table. Example: architecto

address   object  optional  
street   string  optional  
number   string  optional  
complement   string  optional  
neighborhood   string  optional  
city   string  optional  
state   string  optional  
zip_code   string  optional  

Delete employee

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

employee   string   

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

Endpoints

GET api/reports/cash-flow

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/reports/cash-flow" \
    --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 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

GET api/reports/accounts-payable-receivable

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

GET api/up

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

Delete a file

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

uuid   integer   

Example: 1

Get file info

requires authentication

Get file information

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

uuid   integer   

Example: 1

Generate download URL

requires authentication

Generate a signed URL for downloading a file

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/files/6ff8f7f6-1eb3-3525-be4a-3932c805afed/download" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/6ff8f7f6-1eb3-3525-be4a-3932c805afed/download"
);

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

uuid   string   

The UUID of the file to download Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Generate upload URL

requires authentication

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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"Example Path\",
    \"mimetype\": \"Example Mimetype\",
    \"public\": false
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/generate-upload-url"
);

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

let body = {
    "path": "Example Path",
    "mimetype": "Example Mimetype",
    "public": false
};

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

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

Generate bulk upload URL

requires authentication

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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"files\": [
        {
            \"path\": \"Example Files * path\",
            \"mimetype\": \"Example Files * mimetype\",
            \"public\": false
        },
        null
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/files/generate-bulk-upload-url"
);

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

let body = {
    "files": [
        {
            "path": "Example Files * path",
            "mimetype": "Example Files * mimetype",
            "public": false
        },
        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 6g43cv8PD1aE5beadkZfhV6

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

Import

Endpoints for managing NFe imports and product processing.

NFe Imports

Import and process Brazilian electronic invoice (NFe) files.

Create NFe Import

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/nfe/products"
);

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

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

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

List User Imports

requires authentication permission: imports index

List all NFe imports for the authenticated user with filtering and pagination options.

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/imports?sortBy=created_at&sortDesc=1&status=completed&import_type=nfe&per_page=15" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "status": "completed",
    "import_type": "nfe",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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

Get Import Details

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

importId   string   

Example: architecto

Get Import Products

requires authentication permission: 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/architecto/products?sortBy=created_at&sortDesc=1&status=pending&q=Produto+ABC&per_page=15" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/imports/architecto/products"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "status": "pending",
    "q": "Produto ABC",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

importId   string   

Example: architecto

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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

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

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

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

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

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"
}
 

Notifications

Endpoints for user notifications

List notifications

requires authentication

List user notifications

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/notifications?sortBy=created_at&sortDesc=1&per_page=1&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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/notifications"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "per_page": "1",
    "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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

per_page   integer  optional  

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

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

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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notifications\": [
        \"6ff8f7f6-1eb3-3525-be4a-3932c805afed\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/notifications/mark-as-read"
);

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

let body = {
    "notifications": [
        "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
    ]
};

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

Request      

POST api/notifications/mark-as-read

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

notifications   string[]   

O campo value deve ser um UUID vΓ‘lido.

Mark notifications as unread

requires authentication

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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"notifications\": [
        \"6ff8f7f6-1eb3-3525-be4a-3932c805afed\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/notifications/mark-as-unread"
);

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

let body = {
    "notifications": [
        "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
    ]
};

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

Request      

POST api/notifications/mark-as-unread

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

notifications   string[]   

O campo value deve ser um UUID vΓ‘lido.

Mark all notifications as read

requires authentication

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Unread notifications count

requires authentication

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Payment Receipts

Endpoints for payment receipts

List payment receipts

requires authentication permission: 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?sortBy=created_at&sortDesc=1&q=Jo%C3%A3o+Silva&employee_id=1&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=architecto&document=architecto&per_page=22" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "JoΓ£o Silva",
    "employee_id": "1",
    "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": "architecto",
    "document": "architecto",
    "per_page": "22",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "receipt_number": null,
            "receiver_type": null,
            "receiver": {
                "id": null,
                "name": null,
                "document": null
            },
            "payment": {
                "amount": 0,
                "amount_in_words": null,
                "method": null,
                "description": null
            },
            "issuer": {
                "name": null,
                "document": null
            },
            "issue": {
                "date": null,
                "city": null,
                "state": null
            },
            "created_by": {
                "id": null,
                "name": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": null,
            "receipt_number": null,
            "receiver_type": null,
            "receiver": {
                "id": null,
                "name": null,
                "document": null
            },
            "payment": {
                "amount": 0,
                "amount_in_words": null,
                "method": null,
                "description": null
            },
            "issuer": {
                "name": null,
                "document": null
            },
            "issue": {
                "date": null,
                "city": null,
                "state": null
            },
            "created_by": {
                "id": null,
                "name": null
            },
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

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

employee_id   integer  optional  

Filter by employee ID. The id of an existing record in the employees table. Example: 1

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

document   string  optional  

Example: architecto

per_page   integer  optional  

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

Show payment receipt

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

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

Example response (200):


{
    "data": {
        "id": null,
        "receipt_number": null,
        "receiver_type": null,
        "receiver": {
            "id": null,
            "name": null,
            "document": null
        },
        "payment": {
            "amount": 0,
            "amount_in_words": null,
            "method": null,
            "description": null
        },
        "issuer": {
            "name": null,
            "document": null
        },
        "issue": {
            "date": null,
            "city": null,
            "state": null
        },
        "created_by": {
            "id": null,
            "name": null
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/payment-receipts/{receipt}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"844c85f8-1f76-417d-95f4-ca45b947bd0d\",
    \"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\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "844c85f8-1f76-417d-95f4-ca45b947bd0d",
    "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"
};

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

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 id of an existing record in the employees table. Example: 844c85f8-1f76-417d-95f4-ca45b947bd0d

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. O campo value nΓ£o pode ser superior a 255 caracteres. Example: Example Payment method

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

Update payment receipt

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"receiver_type\": \"Example Receiver type\",
    \"employee_id\": \"99f62a43-7d24-4144-a192-da6e5922c79a\",
    \"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\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/payment-receipts/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "receiver_type": "Example Receiver type",
    "employee_id": "99f62a43-7d24-4144-a192-da6e5922c79a",
    "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"
};

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

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 id of an existing record in the employees table. Example: 99f62a43-7d24-4144-a192-da6e5922c79a

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. O campo value nΓ£o pode ser superior a 255 caracteres. Example: Example Payment method

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

Delete payment receipt

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: payment-receipt index

List all payment receipts for a specific employee

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

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

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "receipt_number": null,
            "receiver_type": null,
            "receiver": {
                "id": null,
                "name": null,
                "document": null
            },
            "payment": {
                "amount": 0,
                "amount_in_words": null,
                "method": null,
                "description": null
            },
            "issuer": {
                "name": null,
                "document": null
            },
            "issue": {
                "date": null,
                "city": null,
                "state": null
            },
            "created_by": {
                "id": null,
                "name": null
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": null,
            "receipt_number": null,
            "receiver_type": null,
            "receiver": {
                "id": null,
                "name": null,
                "document": null
            },
            "payment": {
                "amount": 0,
                "amount_in_words": null,
                "method": null,
                "description": null
            },
            "issuer": {
                "name": null,
                "document": null
            },
            "issue": {
                "date": null,
                "city": null,
                "state": null
            },
            "created_by": {
                "id": null,
                "name": null
            },
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

employee_id   integer   

The ID of the employee. Example: 1

employee   string   

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

Permission Groups

Endpoints for permission groups

List permission groups

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

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

Example response (200):


{
    "data": [
        {
            "id": "62dd610c-4a82-34c4-975a-5cdb355260af",
            "name": "quibusdam-ut",
            "display_name": "similique officia sit",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "77d2d404-3230-3975-81bf-a63880d5974b",
            "name": "voluptas-assumenda-laborum",
            "display_name": "aut commodi eligendi",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Create permission group

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "nostrum-qui",
        "display_name": "commodi incidunt iure",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/permission-groups/{permissionGroup}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

permissionGroup   integer   

Example: 1

Delete permission group

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c68e0767-6220-31fb-a489-61093ff79529",
            "name": "Valentin Ramos Zamana",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

q   string  optional  

Example: Structure

Show product brand

requires authentication permission: product-brand show

Show a product brand

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-brands/{productBrand}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

productBrand   string   

Product brand UUID Example: architecto

Create product brand

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/product-brands"
);

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

let body = {
    "name": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: architecto

Update product brand

requires authentication permission: product-brand update

Update a product brand

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

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

let body = {
    "name": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

productBrand   string   

Product brand UUID Example: architecto

Body Parameters

name   string   

Example: architecto

Delete product brand

requires authentication permission: product-brand delete

Delete a product brand

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

productBrand   string   

Product brand UUID Example: architecto

Product Families

Endpoints for product families

List product families

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c68e0767-6220-31fb-a489-61093ff79529",
            "name": "Valentin Ramos Zamana",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

q   string  optional  

Example: Structure

Show product family

requires authentication permission: product-family show

Show a product family

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/product-families/{productFamily}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

productFamily   string   

Product family UUID Example: architecto

Create product family

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

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

let body = {
    "name": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: architecto

Update product family

requires authentication permission: product-family update

Update a product family

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

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

let body = {
    "name": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

productFamily   string   

Product family UUID Example: architecto

Body Parameters

name   string   

Example: architecto

Delete product family

requires authentication permission: product-family delete

Delete a product family

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

productFamily   string   

Product family UUID Example: architecto

Products

Endpoints for products

List products

requires authentication permission: product index

List all products

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/products?sortBy=created_at&sortDesc=1&q=Brick" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "code": "PRD-265058",
            "stock": 7365,
            "product_family": {
                "id": "a05b8477-4b08-4285-9041-8a41c4f6fba8",
                "name": "Elaine Kamila Serna Neto"
            },
            "product_brand": {
                "id": "a05b8477-5584-4702-805f-496ab026b1b3",
                "name": "Liz Sueli Pacheco Neto"
            },
            "unit": {
                "id": "a05b8477-5979-4dd2-a29c-e2ad7640ea53",
                "name": "Mia Letícia Velasques Jr.",
                "abbreviation": "Srta. Talita Zambrano"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Odit et et modi.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "241611a0-a07b-352b-9f83-f15a091959e3",
            "name": "Dr. Yasmin Duarte Queirós Filho",
            "code": "PRD-312753",
            "stock": 49,
            "product_family": {
                "id": "a05b8477-5f33-42b3-8819-0e29ccf81caa",
                "name": "Dr. Sérgio Hernani Pontes"
            },
            "product_brand": {
                "id": "a05b8477-6270-4322-82eb-51fea0c4aec7",
                "name": "Dr. Iasmin Leon Neto"
            },
            "unit": {
                "id": "a05b8477-652f-40c7-a3f5-a07ba0fee7f7",
                "name": "Sr. André Jimenes Prado Neto",
                "abbreviation": "Sr. Cristian Beltrão"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Aut molestiae sunt suscipit doloribus fugiat.",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Brick

Show product

requires authentication permission: product show

Show a product

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "code": "PRD-265058",
        "stock": 7365,
        "product_family": {
            "id": "a05b8477-708e-451e-bf0d-1aa26bb7a761",
            "name": "Elaine Kamila Serna Neto"
        },
        "product_brand": {
            "id": "a05b8477-7337-4385-9f83-1b355a3af572",
            "name": "Liz Sueli Pacheco Neto"
        },
        "unit": {
            "id": "a05b8477-756a-40f0-b240-6026f5f4ec54",
            "name": "Mia Letícia Velasques Jr.",
            "abbreviation": "Srta. Talita Zambrano"
        },
        "image": {
            "id": null,
            "url": null
        },
        "description": "Odit et et modi.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/products/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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

Create product

requires authentication permission: product store

Create a new product

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/products" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"product_family_id\": \"architecto\",
    \"product_brand_id\": \"architecto\",
    \"unit_id\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"stock\": 60
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products"
);

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

let body = {
    "name": "b",
    "product_family_id": "architecto",
    "product_brand_id": "architecto",
    "unit_id": "architecto",
    "description": "Eius et animi quos velit et.",
    "stock": 60
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

product_family_id   string   

The uuid of an existing record in the product_families table. Example: architecto

product_brand_id   string   

The uuid of an existing record in the product_brands table. Example: architecto

unit_id   string   

The uuid of an existing record in the units table. Example: architecto

description   string  optional  

Example: Eius et animi quos velit et.

stock   number   

O campo value deve ser pelo menos 0. Example: 60

Update product

requires authentication permission: product update

Update a product

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/products/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"product_family_id\": \"architecto\",
    \"product_brand_id\": \"architecto\",
    \"unit_id\": \"architecto\",
    \"stock\": 39,
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/products/1"
);

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

let body = {
    "name": "b",
    "product_family_id": "architecto",
    "product_brand_id": "architecto",
    "unit_id": "architecto",
    "stock": 39,
    "description": "Eius et animi quos velit et."
};

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

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

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

product_family_id   string   

The uuid of an existing record in the product_families table. Example: architecto

product_brand_id   string   

The uuid of an existing record in the product_brands table. Example: architecto

unit_id   string   

The uuid of an existing record in the units table. Example: architecto

stock   number   

O campo value deve ser pelo menos 0. Example: 39

description   string  optional  

Example: Eius et animi quos velit et.

Delete product

requires authentication permission: product delete

Delete a product

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

product   string   

Product UUID Example: architecto

Sectors

Endpoints for sectors

List sectors

requires authentication permission: sector index

List all sectors

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/sectors?sortBy=created_at&sortDesc=1&q=Tecnologia" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors"
);

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

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

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

Example response (200):


{
    "data": [
        {
            "id": "25cab747-7694-31a8-af6b-cf648548a55e",
            "name": "quasi laboriosam",
            "slug": null,
            "description": "Sit distinctio tenetur consequuntur sed. Enim totam atque magni beatae. Mollitia sunt magnam fugiat nemo. Rerum corporis dolore non ea vel iusto.",
            "abbreviation": "idk",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d67de751-ca68-3904-8fae-6db446b8ff7a",
            "name": "dolorum illum",
            "slug": null,
            "description": null,
            "abbreviation": "yms",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Tecnologia

Create sector

requires authentication permission: sector store

Create a new sector

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

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 permission: sector show

Get a sector

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "quidem nostrum",
        "slug": null,
        "description": null,
        "abbreviation": "qwr",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/sectors/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sector. Example: 1

sector   string   

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

Update sector

requires authentication permission: sector update

Update a sector

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sector. Example: 1

sector   string   

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

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

Delete sector

requires authentication permission: sector delete

Delete a sector

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sector. Example: 1

sector   string   

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

List sector users

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Miss Pearl Hauck",
            "username": "mitchell.matilda",
            "email": "christian51@example.com",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "502eabbf-311f-3542-a47b-b2a14f5de904",
            "name": "Janick Schultz DDS",
            "username": "micaela88",
            "email": "kconsidine@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 6g43cv8PD1aE5beadkZfhV6

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"f2726f3d-9044-3663-bede-2a0f37053879\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/attach"
);

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

let body = {
    "users": [
        "f2726f3d-9044-3663-bede-2a0f37053879"
    ]
};

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

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"9e13baad-9e20-392f-94ab-6047f7ff6a83\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/detach"
);

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

let body = {
    "users": [
        "9e13baad-9e20-392f-94ab-6047f7ff6a83"
    ]
};

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

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"users\": [
        \"ea57fb8f-9953-354e-9184-d01c4ec16bb0\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/sectors/019556e7-2e9f-777c-a177-30bbf0646c32/users/sync"
);

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

let body = {
    "users": [
        "ea57fb8f-9953-354e-9184-d01c4ec16bb0"
    ]
};

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

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

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

Example response (200):


{
    "data": [
        {
            "name": "aut adipisci",
            "slug": "nostrum-qui-commodi-incidunt-iure"
        },
        {
            "name": "omnis autem",
            "slug": "consequatur-aut-dolores-enim-non-facere-tempora"
        }
    ]
}
 

Request      

GET api/status-modules

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Statuses

Endpoints for statuses

List statuses

requires authentication permission: status index

List all statuses

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/statuses?sortBy=created_at&sortDesc=1&q=Em+andamento" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/statuses"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Em andamento",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "description": "Sr. George de Souza Delvalle",
            "abbreviation": "iure",
            "color": "#aa8e3f",
            "text_color": "#559641",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "665a39c0-48af-31f1-a546-aa4f41372488",
            "description": "Sra. Jéssica Sepúlveda Jr.",
            "abbreviation": "aut",
            "color": "#005d49",
            "text_color": "#8a9b1e",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Em andamento

Create status

requires authentication permission: status store

Create a new status

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/statuses" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Eius et animi quos velit et.\",
    \"abbreviation\": \"v\",
    \"module\": \"architecto\",
    \"sector_id\": \"architecto\",
    \"color\": \"architecto\",
    \"text_color\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/statuses"
);

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

let body = {
    "description": "Eius et animi quos velit et.",
    "abbreviation": "v",
    "module": "architecto",
    "sector_id": "architecto",
    "color": "architecto",
    "text_color": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

description   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: Eius et animi quos velit et.

abbreviation   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: v

module   string   

Example: architecto

sector_id   string   

The uuid of an existing record in the sectors table. Example: architecto

color   string  optional  

Example: architecto

text_color   string  optional  

Example: architecto

Get status

requires authentication permission: status show

Get a status

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "description": "Sr. George de Souza Delvalle",
        "abbreviation": "iure",
        "color": "#aa8e3f",
        "text_color": "#559641",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/statuses/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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 permission: status update

Update a status

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/statuses/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Eius et animi quos velit et.\",
    \"abbreviation\": \"v\",
    \"module\": \"architecto\",
    \"sector_id\": \"architecto\",
    \"color\": \"architecto\",
    \"text_color\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/statuses/1"
);

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

let body = {
    "description": "Eius et animi quos velit et.",
    "abbreviation": "v",
    "module": "architecto",
    "sector_id": "architecto",
    "color": "architecto",
    "text_color": "architecto"
};

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

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

description   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: Eius et animi quos velit et.

abbreviation   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: v

module   string   

Example: architecto

sector_id   string   

The uuid of an existing record in the sectors table. Example: architecto

color   string  optional  

Example: architecto

text_color   string  optional  

Example: architecto

Delete status

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

status   string   

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

Suppliers

Endpoints for suppliers

List suppliers

requires authentication permission: suppliers index

List all suppliers

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/suppliers?sortBy=created_at&sortDesc=1&q=Supplier+name" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/suppliers"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Supplier name",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "email": "yohanna44@example.org",
            "phone": "(94) 94866-9606",
            "document": "90.915.066/0001-02",
            "type": "pj",
            "responsible": "Sra. Katherine de Arruda",
            "image": {
                "id": null,
                "url": null
            },
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            }
        },
        {
            "id": "c71cb930-01f3-381c-9172-e1c70e63388f",
            "name": "Liz Sueli Pacheco Neto",
            "email": "jrosa@example.net",
            "phone": "(49) 3996-5127",
            "document": "69.737.788/0001-10",
            "type": "pf",
            "responsible": "Sr. Rodrigo Gil",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Supplier name

Create supplier

requires authentication permission: suppliers store

Create a new supplier

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

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 permission: suppliers show

Get a supplier

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "email": "yohanna44@example.org",
        "phone": "(94) 94866-9606",
        "document": "90.915.066/0001-02",
        "type": "pj",
        "responsible": "Sra. Katherine de Arruda",
        "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 6g43cv8PD1aE5beadkZfhV6

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 permission: suppliers update

Update a supplier

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/suppliers/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

Get the system types

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/system-types" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Transaction Categories

Endpoints for transaction categories

List transaction categories

requires authentication permission: transaction-category index

List all transaction categories

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/transaction-categories?sortBy=created_at&sortDesc=1&q=Salary&type=entrada" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Salary",
    "type": "entrada",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "description": "Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora.",
            "type": "saída"
        },
        {
            "id": "8529678e-de6b-32f2-9f70-231a0d681563",
            "name": "Dr. Erik Dias Feliciano",
            "description": "Qui repudiandae laboriosam est alias. Ratione nemo voluptate accusamus ut et recusandae modi rerum. Repellendus assumenda et tenetur ab reiciendis.",
            "type": "saída"
        }
    ],
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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

Show transaction category

requires authentication permission: transaction-category show

Show a transaction category

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

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "description": "Et et modi ipsum nostrum. Autem et consequatur aut dolores enim non facere tempora.",
        "type": "saída"
    }
}
 

Request      

GET api/transaction-categories/{transactionCategory}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

transactionCategory   string   

Transaction category UUID Example: architecto

Create transaction category

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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

Update transaction category

requires authentication permission: transaction-category update

Update a transaction category

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

transactionCategory   string   

Transaction category UUID Example: architecto

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

Delete transaction category

requires authentication permission: transaction-category delete

Delete a transaction category

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

transactionCategory   string   

Transaction category UUID Example: architecto

Units

Endpoints for units

List units

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

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

Example response (200):


{
    "data": [
        {
            "id": "40ca43dc-04ad-3013-9e5a-29623bacd146",
            "name": "Dr. Mel Alícia Rios Filho",
            "abbreviation": "Sr. Ian Quintana",
            "description": "Harum fugit non dolorem et.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "043c4510-c1c5-3271-9263-95b3b164db80",
            "name": "Dr. Késia Montenegro",
            "abbreviation": "Thalita Rocha Rios",
            "description": "Repellat ullam ab 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/units

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

q   string  optional  

Example: Structure

Show unit

requires authentication permission: unit show

Show a unit

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "abbreviation": "Edilson Caldeira Filho",
        "description": "Id aut libero aliquam veniam.",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/units/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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

Create unit

requires authentication permission: unit store

Create a new unit

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/units" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"abbreviation\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/units"
);

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

let body = {
    "name": "architecto",
    "abbreviation": "architecto",
    "description": "Eius et animi quos velit et."
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Example: architecto

abbreviation   string   

Example: architecto

description   string  optional  

Example: Eius et animi quos velit et.

Update unit

requires authentication permission: unit update

Update a unit

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/units/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"abbreviation\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/units/1"
);

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

let body = {
    "name": "architecto",
    "abbreviation": "architecto",
    "description": "Eius et animi quos velit et."
};

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

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

Body Parameters

name   string   

Example: architecto

abbreviation   string   

Example: architecto

description   string  optional  

Example: Eius et animi quos velit et.

Delete unit

requires authentication permission: unit delete

Delete a unit

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

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

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

unit   string   

Unit UUID Example: architecto

Users

Endpoints for users

List users

requires authentication permission: user index

List all users

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/users?q=User+name" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Miss Pearl Hauck",
            "username": "balistreri.josiane",
            "email": "wbatz@example.net",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "8529678e-de6b-32f2-9f70-231a0d681563",
            "name": "Gerhard Beier",
            "username": "doris.franecki",
            "email": "pagac.skylar@example.org",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

q   string  optional  

Search query. Example: User name

Get user

requires authentication permission: user show

Get a user

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Miss Pearl Hauck",
        "username": "torp.florence",
        "email": "oking@example.net",
        "image": {
            "id": null,
            "url": null
        },
        "sectors": [],
        "roles": []
    }
}
 

Request      

GET api/users/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the user. Example: 1

Create user

requires authentication permission: user store

Create a new user

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/users" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"username\": \"libby.bradtke\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"3637ab3b-64aa-3e77-a6a7-c306cb6519a5\"
    ],
    \"roles\": [
        \"43fd77a7-5d0e-3206-88ea-5c77b63072ad\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users"
);

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

let body = {
    "name": "Example Name",
    "email": "user@example.com",
    "username": "libby.bradtke",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "3637ab3b-64aa-3e77-a6a7-c306cb6519a5"
    ],
    "roles": [
        "43fd77a7-5d0e-3206-88ea-5c77b63072ad"
    ]
};

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

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: libby.bradtke

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 permission: user update

Update a user

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/users/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"email\": \"user@example.com\",
    \"username\": \"schmidt.elton\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"067d00f5-e958-3b01-bc80-7e5e367be869\"
    ],
    \"roles\": [
        \"af49b819-28db-33bd-b66b-66e0bad1c5fa\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1"
);

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

let body = {
    "name": "Example Name",
    "email": "user@example.com",
    "username": "schmidt.elton",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "067d00f5-e958-3b01-bc80-7e5e367be869"
    ],
    "roles": [
        "af49b819-28db-33bd-b66b-66e0bad1c5fa"
    ]
};

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

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: schmidt.elton

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 permission: user delete

Delete a user

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/users/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user   integer   

The user. Example: 1

Reset user password

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"permissions\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/users/1/permissions"
);

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

let body = {
    "permissions": [
        "bfc53181-d647-36b2-9080-f9c2b76006f4"
    ]
};

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

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

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

Example response (200):


{
    "data": [
        {
            "id": null,
            "name": "quidem",
            "display_name": "Qui commodi incidunt iure odit."
        },
        {
            "id": null,
            "name": "modi",
            "display_name": "Nostrum omnis autem et consequatur aut."
        }
    ]
}
 

Request      

GET api/users/{user}/permissions

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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 permission: work-location index

List all work locations

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/work-locations?sortBy=created_at&sortDesc=1&q=Tecnologia&work=uuid" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Tecnologia",
    "work": "uuid",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "description": "Sr. George de Souza Delvalle",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "c68e0767-6220-31fb-a489-61093ff79529",
            "description": "Valentin Ramos Zamana",
            "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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Eius et animi quos velit et.\",
    \"work_id\": \"architecto\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations"
);

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

let body = {
    "description": "Eius et animi quos velit et.",
    "work_id": "architecto"
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

description   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: Eius et animi quos velit et.

work_id   string   

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

Get work location

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "description": "Sr. George de Souza Delvalle",
        "work": {
            "id": null,
            "name": null
        },
        "documents": [],
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/work-locations/{workLocation}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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 permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/work-locations/019556e7-2e9f-777c-a177-30bbf0646c32"
);

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

let body = {
    "description": "Eius et animi quos velit et."
};

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

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   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: Eius et animi quos velit et.

work_id   string  optional  

The uuid of an existing record in the works table.

Delete work location

requires authentication permission: 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 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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 permission: work index

List all works

Example request:
curl --request GET \
    --get "https://api.bs-homolog.pensou.app.br/api/works?sortBy=created_at&sortDesc=1&q=Tecnologia" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works"
);

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

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

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

Example response (200):


{
    "data": [
        {
            "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "Sr. George de Souza Delvalle",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "started_at": {
                "date": "1983-05-17 00:07:42.000000",
                "timezone_type": 3,
                "timezone": "America/Sao_Paulo"
            },
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d9be5934-80e7-34a9-a136-841b5f0aea83",
            "name": "Wilson Zamana Valdez Sobrinho",
            "address": {
                "street": null,
                "number": null,
                "complement": null,
                "neighborhood": null,
                "city": null,
                "state": null,
                "zip_code": null
            },
            "documents": [],
            "locations": [],
            "started_at": {
                "date": "2009-07-27 01:40:06.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 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

sortBy   string  optional  

Field to sort by. Example: created_at

sortDesc   boolean  optional  

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

q   string  optional  

Search query. Example: Tecnologia

Create work

requires authentication permission: work store

Create a new work

Example request:
curl --request POST \
    "https://api.bs-homolog.pensou.app.br/api/works" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"customer_id\": \"architecto\",
    \"status_id\": \"architecto\",
    \"started_at\": \"2025-11-14T16:40:49\",
    \"address\": {
        \"street\": \"architecto\",
        \"number\": \"architecto\",
        \"neighborhood\": \"architecto\",
        \"city\": \"architecto\",
        \"state\": \"architecto\",
        \"zip_code\": \"architecto\"
    }
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works"
);

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

let body = {
    "name": "b",
    "customer_id": "architecto",
    "status_id": "architecto",
    "started_at": "2025-11-14T16:40:49",
    "address": {
        "street": "architecto",
        "number": "architecto",
        "neighborhood": "architecto",
        "city": "architecto",
        "state": "architecto",
        "zip_code": "architecto"
    }
};

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

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

customer_id   string   

The uuid of an existing record in the customers table. Example: architecto

status_id   string   

The uuid of an existing record in the statuses table. Example: architecto

started_at   string  optional  

O campo value deve ser uma data vΓ‘lida. Example: 2025-11-14T16:40:49

address   object   
street   string   

Example: architecto

number   string   

Example: architecto

complement   string  optional  
neighborhood   string   

Example: architecto

city   string   

Example: architecto

state   string   

Example: architecto

zip_code   string   

Example: architecto

Get work

requires authentication permission: work show

Get a work

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

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

Example response (200):


{
    "data": {
        "id": "bfc53181-d647-36b2-9080-f9c2b76006f4",
        "name": "Sr. George de Souza Delvalle",
        "address": {
            "street": null,
            "number": null,
            "complement": null,
            "neighborhood": null,
            "city": null,
            "state": null,
            "zip_code": null
        },
        "documents": [],
        "locations": [],
        "started_at": {
            "date": "1983-05-17 00:07:42.000000",
            "timezone_type": 3,
            "timezone": "America/Sao_Paulo"
        },
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/works/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

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 permission: work update

Update a work

Example request:
curl --request PUT \
    "https://api.bs-homolog.pensou.app.br/api/works/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"customer_id\": \"architecto\",
    \"status_id\": \"architecto\",
    \"started_at\": \"2025-11-14T16:40:49\"
}"
const url = new URL(
    "https://api.bs-homolog.pensou.app.br/api/works/1"
);

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

let body = {
    "name": "b",
    "customer_id": "architecto",
    "status_id": "architecto",
    "started_at": "2025-11-14T16:40:49"
};

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

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   

O campo value nΓ£o pode ser superior a 255 caracteres. Example: b

customer_id   string   

The uuid of an existing record in the customers table. Example: architecto

status_id   string   

The uuid of an existing record in the statuses table. Example: architecto

started_at   string  optional  

O campo value deve ser uma data vΓ‘lida. Example: 2025-11-14T16:40:49

address   object  optional  
street   string  optional  
number   string  optional  
complement   string  optional  
neighborhood   string  optional  
city   string  optional  
state   string  optional  
zip_code   string  optional  

Delete work

requires authentication permission: work delete

Delete a work

Example request:
curl --request DELETE \
    "https://api.bs-homolog.pensou.app.br/api/works/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --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 6g43cv8PD1aE5beadkZfhV6",
    "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 6g43cv8PD1aE5beadkZfhV6

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