# List permissions

`GET https://api.fiscalisto.com/v1/permissions`

Every permission a role or a person can have, with its name in the app, its group and whether it's sensitive.

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const { data } = await fiscalisto.permissions.list();
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

data = fiscalisto.permissions.list()["data"]
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$data = $fiscalisto->permissions->list()['data'];
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var permissionList = await fiscalisto.Permissions.ListAsync();
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	permissionList, err := client.Permissions.List(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *permissionList)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var permissionList = fiscalisto.permissions().list();
System.out.println(permissionList);
```

## Response 200

OK.

A `PermissionList` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"list"` | yes | What kind of object it is («invoice», «customer»…). |
| `data` | array of object | yes | The objects on this page. |
| `data[].id` | string | yes | Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). |
| `data[].object` | `"permission"` | yes | What kind of object it is («invoice», «customer»…). |
| `data[].name` | string | yes | Name. |
| `data[].group` | string | yes | Its group, as in Ajustes › Roles. |
| `data[].sensitive` | boolean | yes | Sensitive (team, credentials, security, plan): granting or removing it is done in the app. |
| `has_more` | boolean | yes | true if there are more: request the next one with starting_after set to the id of the last one. |
| `url` | string | yes | This list's path. |

```json
{
  "object": "list",
  "data": [
    {
      "id": "facturar:timbrar",
      "object": "permission",
      "name": "Timbrar",
      "group": "Facturar",
      "sensitive": false
    }
  ],
  "has_more": false,
  "url": "/v1/permissions"
}
```

## Errors

It can answer 400, 401, 403, 404, 429, 500 with the usual error body; each code is in https://fiscalisto.com/en/docs/api/errores.md.
