---
title: Elencare profili e template
project: OpenTemplates
version: 1.0
section: reference
language: it
license: MIT
url: https://totaljs.es/docs/it/opentemplates/1-0/reference/profiles/
updated: 2026-11-19T07:56:22.329Z
---

# Elencare profili e template

> Ottieni i profili, gli ID dei loro template e i modelli di esempio.

```text
GET /profiles/
```

Restituisce ogni profilo con i suoi template. Usalo per costruire un elenco di template nella tua app, o per vedere quali campi si aspetta un template. Il [token API](../../guides/api-tokens/) ha bisogno di **Allow read list of profiles**.

## Esempio

```bash
curl -H "x-token: YOUR_TOKEN" https://templates.example.com/profiles/
```

```json
[
	{
		"id": "JapPJ01d760f",
		"name": "Demo project",
		"icon": "ti ti-file-alt",
		"color": "#4285F4",
		"reference": "demo",
		"templates": [
			{
				"id": "JapPJ01f760f",
				"name": "Invoice",
				"reference": "demo/invoice",
				"model": {
					"number": "2026-001",
					"customer": "Jane Doe",
					"items": [
						{
							"name": "Website design",
							"price": 1200
						},
						{
							"name": "Hosting (1 year)",
							"price": 240
						}
					],
					"total": 1440
				}
			},
			{
				"id": "JapPJ01h760f",
				"name": "Welcome letter",
				"reference": "demo/welcome",
				"model": {
					"name": "Total.js OpenTemplates"
				}
			},
			{
				"id": "JapPrd1cW61f",
				"name": "Receipt",
				"reference": "demo/receipt",
				"model": {
					"name": "Total.js OpenTemplates"
				}
			},
			{
				"id": "JapQXI1d360f",
				"name": "Credit note",
				"reference": "demo/creditnote",
				"model": {}
			}
		]
	},
	{
		"id": "JapPab1cD61f",
		"name": "Letters",
		"icon": "ti ti-file-alt",
		"color": "#4285F4",
		"reference": "letters",
		"templates": [
			{
				"id": "JapPJ01h760f",
				"name": "Welcome letter",
				"reference": "letters/welcome",
				"model": {
					"name": "Total.js OpenTemplates"
				}
			}
		]
	},
	{
		"id": "JapPJ01e761f",
		"name": "Contracts",
		"icon": "ti ti-folder",
		"color": "#E67E22",
		"reference": "contracts",
		"templates": []
	}
]
```

| Campo | Significato |
|---|---|
| `id` | L'ID interno del profilo. |
| `name`, `icon`, `color` | Come sono impostati nel [profilo](../../guides/profiles/). |
| `reference` | L'identificatore del profilo. |
| `templates[].id` | L'ID interno del template. |
| `templates[].name` | Il nome del template. |
| `templates[].reference` | L'ID del template da inviare a [Generare un template](../render/). |
| `templates[].model` | Il modello di esempio del template. Leggi [Sintassi dei template](../../guides/template-syntax/). |

## Senza il permesso

Un token senza **Allow read list of profiles** riceve `401`:

```json
[{"name":"401","error":"401: Unauthorized"}]
```
