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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "quia",
            "display_name": "Molestiae reprehenderit nulla deleniti quo qui."
        },
        {
            "id": null,
            "name": "possimus",
            "display_name": "Delectus id facilis unde."
        }
    ],
    "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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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-12-12T03: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-12-13T03: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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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-26T03: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-22T03: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.gestao-arquivos.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.gestao-arquivos.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
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.gestao-arquivos.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.gestao-arquivos.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-12-12T03: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.gestao-arquivos.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.gestao-arquivos.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
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.gestao-arquivos.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.gestao-arquivos.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

Permission: No specific permission required

Login with email and password

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Get the current user

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Update the current user profile

Example request:
curl --request PUT \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Logout the current user

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Get all user preferences

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Set or update a user preference

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Delete a specific user preference

Example request:
curl --request DELETE \
    "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.pensou.app.br/api/bank-accounts/16" \
    --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.gestao-arquivos.pensou.app.br/api/bank-accounts/16"
);

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

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

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

Delete bank account

requires authentication Permission: bank-account delete

Delete a bank account

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

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

Banks

Endpoints for banks

List banks

requires authentication Permission: bank index

List all banks

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Search for address information by CEP (Brazilian postal code)

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.pensou.app.br/api/cash-flows/16" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/cash-flows/16"
);

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

Update cash flow

requires authentication Permission: cash-flow update

Update a cash flow

Example request:
curl --request PUT \
    "https://api.gestao-arquivos.pensou.app.br/api/cash-flows/16" \
    --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.gestao-arquivos.pensou.app.br/api/cash-flows/16"
);

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

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

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

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.gestao-arquivos.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.gestao-arquivos.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-03T11:09:18.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-06-23T05:58:38.000000Z"
        },
        {
            "id": "fa253524-dd6a-3fdb-a788-0cabcf134db7",
            "opened_by": null,
            "opened_at": "2019-04-12T10:54:57.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.gestao-arquivos.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.gestao-arquivos.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-03T11:09:18.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-06-23T05:58:38.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.pensou.app.br/api/cash-sessions/6ff8f7f6-1eb3-3525-be4a-3932c805afed" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/cash-sessions/6ff8f7f6-1eb3-3525-be4a-3932c805afed"
);

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-03T11:09:18.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-06-23T05:58:38.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: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Delete cash session

requires authentication Permission: cash-session delete

Delete a cash session

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

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: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Customers

Endpoints for customers

List customers

requires authentication Permission: customers index

List all customers

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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  optional  

Endereço.

street   string  optional  

Rua. This field is required when address is present. Example: Example Address street

number   string  optional  

Número. This field is required when address is present. Example: Example Address number

complement   string  optional  

Complemento. Example: Example Address complement

neighborhood   string  optional  

Bairro. This field is required when address is present. Example: Example Address neighborhood

city   string  optional  

Cidade. This field is required when address is present. Example: Example Address city

state   string  optional  

Estado. This field is required when address is present. Example: Example Address state

zip_code   string  optional  

CEP. This field is required when address is present. Example: Example Address zip code

Get customer

requires authentication Permission: customers index

Get a customer

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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. This field is required when address is present. Example: Example Address street

number   string  optional  

Número. This field is required when address is present. Example: Example Address number

complement   string  optional  

Complemento. Example: Example Address complement

neighborhood   string  optional  

Bairro. This field is required when address is present. Example: Example Address neighborhood

city   string  optional  

Cidade. This field is required when address is present. Example: Example Address city

state   string  optional  

Estado. This field is required when address is present. Example: Example Address state

zip_code   string  optional  

CEP. This field is required when address is present. Example: Example Address zip code

Delete customer

requires authentication Permission: customers delete

Delete a customer

Example request:
curl --request DELETE \
    "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "a4855dc5-0acb-33c3-b921-f4291f719ca0",
            "name": "Sr. Emerson Torres Ferminiano",
            "file": {
                "id": null,
                "url": null,
                "extension": null,
                "current_version": null,
                "created_at": null
            },
            "share_token": null,
            "is_shared_active": null,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "5707ca55-f609-3528-be8b-1baeaee1567e",
            "name": "Srta. Rayane Galindo",
            "file": {
                "id": null,
                "url": null,
                "extension": null,
                "current_version": null,
                "created_at": null
            },
            "share_token": null,
            "is_shared_active": 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.

Get document

requires authentication Permission: documents show

Get a document

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/documents/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/documents/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",
        "file": {
            "id": null,
            "url": null,
            "extension": null,
            "current_version": null,
            "created_at": null
        },
        "share_token": null,
        "is_shared_active": null,
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET 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

Create document

requires authentication Permission: documents store

Create a new document

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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

Generate share link

requires authentication Permission: documents share

Generate a unique share link for a document

Example request:
curl --request POST \
    "https://api.gestao-arquivos.pensou.app.br/api/documents/019556e7-2e9f-777c-a177-30bbf0646c32/share" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/documents/019556e7-2e9f-777c-a177-30bbf0646c32/share"
);

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",
    "token": "string"
}
 

Request      

POST api/documents/{document}/share

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

Revoke share link

requires authentication Permission: documents share

Revoke the share link for a document

Example request:
curl --request DELETE \
    "https://api.gestao-arquivos.pensou.app.br/api/documents/019556e7-2e9f-777c-a177-30bbf0646c32/share" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/documents/019556e7-2e9f-777c-a177-30bbf0646c32/share"
);

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/documents/{document}/share

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.gestao-arquivos.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.gestao-arquivos.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": "0e218834-b721-40c9-af4b-3e0249bcdfbf",
            "name": "aut",
            "description": "Nostrum qui commodi incidunt iure.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "6346ae41-0804-4c11-855e-082a343e844c",
            "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.gestao-arquivos.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.gestao-arquivos.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": "4766267c-3591-408f-83a8-132492795d0d",
        "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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "1d5e2817-579c-4012-b392-ee69ab424bc5",
            "name": "Rodrigo Leon",
            "cpf": "421.700.432-81",
            "rg": "590214902",
            "ctps": null,
            "phone": null,
            "birthdate": "1982-07-26",
            "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": "448f262c-ba9c-4be4-a621-427b9088d76a",
            "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.gestao-arquivos.pensou.app.br/api/employees/16" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/employees/16"
);

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": "1c9da60a-dab3-4798-9600-a2e895861542",
        "name": "Rodrigo Leon",
        "cpf": "421.700.432-81",
        "rg": "590214902",
        "ctps": null,
        "phone": null,
        "birthdate": "1982-07-26",
        "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: 16

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.gestao-arquivos.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-26T20:09:21\",
    \"email\": \"kutch.cynthia@example.org\",
    \"employee_role_id\": \"architecto\"
}"
const url = new URL(
    "https://api.gestao-arquivos.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-26T20:09:21",
    "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-26T20:09:21

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.gestao-arquivos.pensou.app.br/api/employees/16" \
    --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-26T20:09:21\",
    \"email\": \"kutch.cynthia@example.org\",
    \"employee_role_id\": \"architecto\"
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/employees/16"
);

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-26T20:09:21",
    "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: 16

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-26T20:09:21

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

Permission: No specific permission required

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/reports/cash-flow" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.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

Permission: No specific permission required

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/reports/accounts-payable-receivable" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.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

Permission: No specific permission required

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/up" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.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

File Versions

Endpoints for file version management

Create version

requires authentication Permission: file version

Create a new version and update file with new data

Example request:
curl --request POST \
    "https://api.gestao-arquivos.pensou.app.br/api/files/6ff8f7f6-1eb3-3525-be4a-3932c805afed/versions" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"path\": \"Example Path\",
    \"size\": \"Example Size\",
    \"extension\": \"Example Extension\",
    \"responsible_user_id\": \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/files/6ff8f7f6-1eb3-3525-be4a-3932c805afed/versions"
);

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

let body = {
    "path": "Example Path",
    "size": "Example Size",
    "extension": "Example Extension",
    "responsible_user_id": "bfc53181-d647-36b2-9080-f9c2b76006f4"
};

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

Example response (201):



 

Request      

POST api/files/{fileUuid}/versions

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

fileUuid   string   

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

Body Parameters

path   string   

Path. Example: Example Path

size   string   

Size. Example: Example Size

extension   string   

Extension. Example: Example Extension

responsible_user_id   string  optional  

Responsible user id. O campo value deve ser um UUID válido. The uuid of an existing record in the users table. Example: bfc53181-d647-36b2-9080-f9c2b76006f4

List versions

requires authentication Permission: No specific permission required

List all versions of a file

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

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": "string",
            "version_number": "integer",
            "name": "string",
            "size": "string",
            "extension": "string",
            "created_by": "object",
            "created_at": "datetime"
        }
    ]
}
 

Request      

GET api/files/{fileUuid}/versions

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

fileUuid   string   

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

Get version

requires authentication Permission: No specific permission required

Get details of a specific version

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

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

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

Example response (200):


{
    "id": "string",
    "version_number": "integer",
    "name": "string",
    "size": "string",
    "extension": "string",
    "created_by": "object",
    "created_at": "datetime"
}
 

Request      

GET api/file-versions/{versionUuid}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

versionUuid   string   

The UUID of the version Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Restore version

requires authentication Permission: file version

Restore a version as the current file

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

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": "Version restored successfully"
}
 

Request      

POST api/file-versions/{versionUuid}/restore

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

versionUuid   string   

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

Download version

requires authentication Permission: No specific permission required

Generate signed URL for downloading a specific version

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/file-versions/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.gestao-arquivos.pensou.app.br/api/file-versions/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": "string",
    "version_number": "integer"
}
 

Request      

GET api/file-versions/{versionUuid}/download

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

versionUuid   string   

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

Delete version

requires authentication Permission: file version

Soft delete a specific version

Example request:
curl --request DELETE \
    "https://api.gestao-arquivos.pensou.app.br/api/file-versions/6ff8f7f6-1eb3-3525-be4a-3932c805afed" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/file-versions/6ff8f7f6-1eb3-3525-be4a-3932c805afed"
);

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/file-versions/{versionUuid}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

versionUuid   string   

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

Files

Endpoints for files

Delete file

requires authentication Permission: No specific permission required

Delete a file

Example request:
curl --request DELETE \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Get file information

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Generate a signed URL for downloading a file

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Generate a signed URL for uploading a file

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Generate signed URLs for uploading multiple files

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

List user notifications

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Mark one or many notifications as read

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Mark one or many notifications as unread

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Mark all user notifications as read

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Count of unread notifications for the user

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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

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.gestao-arquivos.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.gestao-arquivos.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": "bfc53181-d647-36b2-9080-f9c2b76006f4",
            "name": "nostrum-qui",
            "display_name": "commodi incidunt iure",
            "active": null,
            "permissions_count": 0,
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "d9be5934-80e7-34a9-a136-841b5f0aea83",
            "name": "modi-ipsum",
            "display_name": "nostrum omnis autem",
            "active": null,
            "permissions_count": 0,
            "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.gestao-arquivos.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\",
    \"active\": false
}"
const url = new URL(
    "https://api.gestao-arquivos.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",
    "active": false
};

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

active   boolean  optional  

Active. Example: false

Update permission group

requires authentication Permission: permission-group update

Update a permission group

Example request:
curl --request PUT \
    "https://api.gestao-arquivos.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\",
    \"active\": false
}"
const url = new URL(
    "https://api.gestao-arquivos.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",
    "active": false
};

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

active   boolean  optional  

Active. Example: false

Show permission group

requires authentication Permission: permission-group show

Show a permission group

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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",
        "active": null,
        "permissions_count": 0,
        "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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "14b4c183-e92e-3290-9479-d6b89634223b",
            "name": "Cléber Abreu Gonçalves Filho",
            "code": "PRD-027212",
            "stock": 2924672,
            "product_family": {
                "id": "a073f2db-a391-4b2c-804a-404306d27dec",
                "name": "Josué Queirós Filho"
            },
            "product_brand": {
                "id": "a073f2db-aab1-44a2-8934-2e13cf30f287",
                "name": "Srta. Suellen Cynthia Barreto Filho"
            },
            "unit": {
                "id": "a073f2db-ade1-4d70-ba82-f94e9e59da8d",
                "name": "Sr. Rogério Arruda",
                "abbreviation": "Sra. Cláudia Isadora Torres Neto"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Reiciendis magni voluptatem tempore voluptates culpa.",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "0b3ddfcf-3cec-37df-8e23-4ca508067f65",
            "name": "Dr. Ruth Débora Valentin Neto",
            "code": "PRD-387419",
            "stock": 75250168,
            "product_family": {
                "id": "a073f2db-b226-4c9d-85bd-1a96a3193e85",
                "name": "Srta. Bianca Benez Velasques Filho"
            },
            "product_brand": {
                "id": "a073f2db-b4f7-4c48-afb3-c315757d500f",
                "name": "Dr. Júlia Miranda Escobar Sobrinho"
            },
            "unit": {
                "id": "a073f2db-b792-4174-9b69-9eecd4b328ae",
                "name": "Betina Carrara Arruda",
                "abbreviation": "Dener Padrão Chaves"
            },
            "image": {
                "id": null,
                "url": null
            },
            "description": "Unde eaque quis reprehenderit porro est minus consequatur cum.",
            "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.gestao-arquivos.pensou.app.br/api/products/16" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/products/16"
);

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": "a073f2db-c276-4d6b-b157-e80db0350ca6",
            "name": "Elaine Kamila Serna Neto"
        },
        "product_brand": {
            "id": "a073f2db-c516-4134-a115-9c21bbf35079",
            "name": "Liz Sueli Pacheco Neto"
        },
        "unit": {
            "id": "a073f2db-c7c9-4a8f-983f-d8adf8b6f0a3",
            "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: 16

product   string   

Product UUID Example: architecto

Create product

requires authentication Permission: product store

Create a new product

Example request:
curl --request POST \
    "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.pensou.app.br/api/products/16" \
    --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.gestao-arquivos.pensou.app.br/api/products/16"
);

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

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

Public Documents

Public endpoints for shared documents

Get shared document

Permission: No specific permission required

Get a shared document by token

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/public/documents/abc123..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/public/documents/abc123..."
);

const headers = {
    "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",
        "category": null,
        "created_at": null
    }
}
 

Request      

GET api/public/documents/{token}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

token   string   

Share token Example: abc123...

Public Single-Use Links

Public single-use endpoints for documentables

Permission: No specific permission required

Get a work location by single-use token (consumed after first access)

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/public/single-use/work-locations/abc123..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/public/single-use/work-locations/abc123..."
);

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

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

Example response (200):


{
    "data": {
        "id": "c68e0767-6220-31fb-a489-61093ff79529",
        "description": "Valentin Ramos Zamana",
        "created_at": null
    }
}
 

Request      

GET api/public/single-use/work-locations/{token}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

token   string   

Single-use token Example: abc123...

Responsible

Endpoints for responsible

List responsibles

requires authentication Permission: responsible index

List all responsibles

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/responsibles?sortBy=created_at&sortDesc=1&q=Responsible+name%2C+email%2C+phone+or+role" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles"
);

const params = {
    "sortBy": "created_at",
    "sortDesc": "1",
    "q": "Responsible name, email, phone or role",
};
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",
            "role": "consequatur",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ac9e0973-adfe-32df-ade4-9b9752e8c6ad",
            "name": "Srta. Maitê Simone Rangel",
            "email": "sandra09@example.com",
            "phone": "(98) 4569-6081",
            "role": "doloremque",
            "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/responsibles

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: Responsible name, email, phone or role

Create responsible

requires authentication Permission: responsible store

Create a new responsible

Example request:
curl --request POST \
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"role\": \"Example Role\",
    \"email\": \"user@example.com\",
    \"phone\": \"(11) 99999-9999\",
    \"works\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles"
);

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

let body = {
    "name": "Example Name",
    "role": "Example Role",
    "email": "user@example.com",
    "phone": "(11) 99999-9999",
    "works": [
        "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/responsibles

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nome. Example: Example Name

role   string   

Cargo. Example: Example Role

email   string  optional  

E-mail. This field is required when phone is not present. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

phone   string  optional  

Telefone. This field is required when email is not present. Example: (11) 99999-9999

works   string[]  optional  

Works *. The uuid of an existing record in the works table.

Get responsible

requires authentication Permission: responsible show

Get a responsible

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/responsibles/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles/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",
        "role": "consequatur",
        "created_at": null,
        "updated_at": null
    }
}
 

Request      

GET api/responsibles/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the responsible. Example: 1

responsible   string   

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

Update responsible

requires authentication Permission: responsible update

Update a responsible

Example request:
curl --request PUT \
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Example Name\",
    \"role\": \"Example Role\",
    \"email\": \"user@example.com\",
    \"phone\": \"(11) 99999-9999\",
    \"works\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles/1"
);

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

let body = {
    "name": "Example Name",
    "role": "Example Role",
    "email": "user@example.com",
    "phone": "(11) 99999-9999",
    "works": [
        "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/responsibles/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the responsible. Example: 1

responsible   string   

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

Body Parameters

name   string  optional  

Nome. Example: Example Name

role   string  optional  

Cargo. Example: Example Role

email   string  optional  

E-mail. This field is required when phone is not present. O campo value deve ser um endereço de e-mail válido. Example: user@example.com

phone   string  optional  

Telefone. This field is required when email is not present. Example: (11) 99999-9999

works   string[]  optional  

Works *. The uuid of an existing record in the works table.

Delete responsible

requires authentication Permission: responsible delete

Delete a responsible

Example request:
curl --request DELETE \
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles/1" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/responsibles/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/responsibles/{id}

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the responsible. Example: 1

responsible   string   

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

Sectors

Endpoints for sectors

List sectors

requires authentication Permission: sector index

List all sectors

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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": "64f1adb5-7b95-3449-b01a-4c084f085f3e",
            "name": "unde odit",
            "slug": null,
            "description": null,
            "abbreviation": "xst",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "87184676-116c-34a2-9f1e-3843ea379587",
            "name": "quo adipisci",
            "slug": null,
            "description": "Expedita delectus et vitae voluptas consectetur. Consectetur praesentium delectus impedit itaque ullam. Optio veritatis delectus provident quia voluptatum quia expedita illum.",
            "abbreviation": null,
            "created_at": null,
            "updated_at": null
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/sectors

Headers

Authorization      

Example: Bearer 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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "pauline09",
            "email": "mitchell.matilda@example.org",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        },
        {
            "id": "f2726f3d-9044-3663-bede-2a0f37053879",
            "name": "Mrs. Abbey Gaylord MD",
            "username": "madisen51",
            "email": "qankunding@example.com",
            "image": {
                "id": null,
                "url": null
            },
            "sectors": [],
            "roles": []
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Anterior",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Próximo &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/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.gestao-arquivos.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\": [
        \"9e13baad-9e20-392f-94ab-6047f7ff6a83\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.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": [
        "9e13baad-9e20-392f-94ab-6047f7ff6a83"
    ]
};

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.gestao-arquivos.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\": [
        \"c7bf1d68-67aa-3fb7-979d-eaef8e3908bc\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.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": [
        "c7bf1d68-67aa-3fb7-979d-eaef8e3908bc"
    ]
};

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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.pensou.app.br/api/suppliers/16" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/suppliers/16"
);

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

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.gestao-arquivos.pensou.app.br/api/suppliers/16" \
    --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.gestao-arquivos.pensou.app.br/api/suppliers/16"
);

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

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.gestao-arquivos.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.gestao-arquivos.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 Permission: No specific permission required

Get the system types

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "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
        },
        {
            "id": "2024410d-26cd-3763-b1f0-31011d306e58",
            "name": "Dr. Luciano Valência Delvalle",
            "abbreviation": "Erik Matheus Feliciano Filho",
            "description": "Et error neque recusandae 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/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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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

List technical users

requires authentication Permission: user index

List all users from the technical sector

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

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",
            "email": "oking@example.net"
        },
        {
            "id": "0733da06-3f67-3b0d-b923-684c336397e5",
            "name": "Vito Bradtke",
            "email": "skylar.kuvalis@example.net"
        }
    ]
}
 

Request      

GET api/users/technical

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

Get user

requires authentication Permission: user show

Get a user

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.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.gestao-arquivos.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": "libby.bradtke",
        "email": "torp.florence@example.org",
        "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.gestao-arquivos.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\": \"schmidt.elton\",
    \"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.gestao-arquivos.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": "schmidt.elton",
    "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: "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: schmidt.elton

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.gestao-arquivos.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\": \"franecki.brennon\",
    \"password\": \"password123\",
    \"image\": {
        \"0\": \"example1\",
        \"1\": \"example2\",
        \"path\": \"Example Image path\",
        \"name\": \"Example Name\",
        \"extension\": \"Example Image extension\",
        \"size\": \"Example Image size\"
    },
    \"sectors\": [
        \"4d08ad85-13a7-32e9-86de-fb3dca87190a\"
    ],
    \"roles\": [
        \"143f14ee-91a0-3454-b6d3-a0238f33b92b\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.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": "franecki.brennon",
    "password": "password123",
    "image": {
        "0": "example1",
        "1": "example2",
        "path": "Example Image path",
        "name": "Example Name",
        "extension": "Example Image extension",
        "size": "Example Image size"
    },
    "sectors": [
        "4d08ad85-13a7-32e9-86de-fb3dca87190a"
    ],
    "roles": [
        "143f14ee-91a0-3454-b6d3-a0238f33b92b"
    ]
};

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: franecki.brennon

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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": "6023129e-4a4c-3fb7-aabd-6705713f48df",
            "description": "Robson Deivid Gonçalves",
            "work": {
                "id": null,
                "name": null
            },
            "documents": [],
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "b3cdfe01-3e7d-3d5c-b9e1-6ae6f47fb11f",
            "description": "Dr. James Teles Neto",
            "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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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.gestao-arquivos.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": [],
            "responsibles": [],
            "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": [],
            "responsibles": [],
            "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.gestao-arquivos.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-26T20:09:22\",
    \"address\": {
        \"street\": \"architecto\",
        \"number\": \"architecto\",
        \"neighborhood\": \"architecto\",
        \"city\": \"architecto\",
        \"state\": \"architecto\",
        \"zip_code\": \"architecto\"
    }
}"
const url = new URL(
    "https://api.gestao-arquivos.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-26T20:09:22",
    "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-26T20:09:22

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.gestao-arquivos.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.gestao-arquivos.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": [],
        "responsibles": [],
        "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.gestao-arquivos.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-26T20:09:22\"
}"
const url = new URL(
    "https://api.gestao-arquivos.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-26T20:09:22"
};

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-26T20:09:22

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

List work responsibles

requires authentication Permission: work show

List all responsibles assigned to a work

Example request:
curl --request GET \
    --get "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles"
);

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",
            "role": "consequatur",
            "created_at": null,
            "updated_at": null
        },
        {
            "id": "ac9e0973-adfe-32df-ade4-9b9752e8c6ad",
            "name": "Srta. Maitê Simone Rangel",
            "email": "sandra09@example.com",
            "phone": "(98) 4569-6081",
            "role": "doloremque",
            "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/{work}/responsibles

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

work   string   

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

Attach responsibles to work

requires authentication Permission: work responsibles attach

Attach responsibles to a work without removing existing ones. Expects an array of responsible UUIDs in the "responsibles" field.

Example request:
curl --request POST \
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"responsibles\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/attach"
);

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

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

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

Example response (200):


{
    "message": "Responsibles attached successfully"
}
 

Request      

POST api/works/{work}/responsibles/attach

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

work   string   

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

Body Parameters

responsibles   string[]  optional  

UUID do responsável. The uuid of an existing record in the responsibles table.

Detach responsibles from work

requires authentication Permission: work responsibles detach

Remove specific responsibles from a work. Expects an array of responsible UUIDs in the "responsibles" field.

Example request:
curl --request POST \
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"responsibles\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/detach"
);

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

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

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

Example response (200):


{
    "message": "Responsibles detached successfully"
}
 

Request      

POST api/works/{work}/responsibles/detach

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

work   string   

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

Body Parameters

responsibles   string[]  optional  

UUID do responsável. The uuid of an existing record in the responsibles table.

Sync work responsibles

requires authentication Permission: work responsibles sync

Replace all work responsibles with the provided list. Expects an array of responsible UUIDs in the "responsibles" field.

Example request:
curl --request POST \
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync" \
    --header "Authorization: Bearer 6g43cv8PD1aE5beadkZfhV6" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"responsibles\": [
        \"bfc53181-d647-36b2-9080-f9c2b76006f4\"
    ]
}"
const url = new URL(
    "https://api.gestao-arquivos.pensou.app.br/api/works/019556e7-2e9f-777c-a177-30bbf0646c32/responsibles/sync"
);

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

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

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

Example response (200):


{
    "message": "Responsibles synchronized successfully"
}
 

Request      

POST api/works/{work}/responsibles/sync

Headers

Authorization      

Example: Bearer 6g43cv8PD1aE5beadkZfhV6

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

work   string   

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

Body Parameters

responsibles   string[]  optional  

UUID do responsável. The uuid of an existing record in the responsibles table.