Spanish Total.js
Slovenčina
Dokumentácia Pre AI agentov
Obsah

Zoznam profilov a šablón

Získaj profily, ID ich šablón a ukážkové modely.

.md GitHub
Na tejto stránke
GET /profiles/

Vráti každý profil s jeho šablónami. Použi ho na zostavenie zoznamu šablón vo svojej aplikácii alebo na zistenie, aké polia šablóna očakáva. API token potrebuje Allow read list of profiles.

Príklad

curl -H "x-token: YOUR_TOKEN" https://templates.example.com/profiles/
[
    {
        "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": []
    }
]
PoleVýznam
idInterné ID profilu.
name, icon, colorTak, ako sú nastavené v profile.
referenceIdentifikátor profilu.
templates[].idInterné ID šablóny.
templates[].nameNázov šablóny.
templates[].referenceID šablóny, ktoré pošleš do Vykreslenie šablóny.
templates[].modelUkážkový model šablóny. Pozri si Syntax šablón.

Bez oprávnenia

Token bez Allow read list of profiles dostane 401:

[{"name":"401","error":"401: Unauthorized"}]
Vyrobené v Európe