Zum Inhalt springen
aYOUne
← Konfiguration API

DocumentTemplates

Singular: DocumentTemplate — Base-URL: https://config-api.ayoune.app — Zugriff: CRUD — Maschinenlesbare Beschreibung (JSON · YAML)

Jetzt ausprobieren beta

Requests werden über den consumer-app Proxy an *.ayoune.app weitergeleitet. Tokens bleiben im Browser und werden pro Call mitgesendet.

Beispiel-Response (aufgezeichnet) Beispiel

Eine echte, zuvor aufgezeichnete GET /:id-Antwort dieses Endpunkts — nicht der Live-Call oben. Sensible Felder sind maskiert.

{
  "payload": {
    "_id": "6ac639fe2da0524d1aa29452",
    "name": "Produkt-Datenblatt (Standard)",
    "description": "Eigenes Datenblatt aus den Produkt-Stammdaten. Texte je Sprache anpassbar.",
    "docType": "product-datasheet",
    "templateSource": {
      "kind": "product-datasheet",
      "version": 1,
      "texts": {
        "de": {
          "title": "Datenblatt",
          "sku": "Artikelnummer",
          "ean": "EAN",
          "brand": "Marke",
          "revision": "Revision",
          "date": "Stand",
          "description": "Beschreibung",
          "attributes": "Eigenschaften",
          "dimensions": "Maße und Gewicht",
          "length": "Länge",
          "width": "Breite",
          "height": "Höhe",
          "weight": "Gewicht",
          "prices": "Preise",
          "sellPrice": "Verkaufspreis",
          "uvp": "Unverbindliche Preisempfehlung",
          "page": "Seite"
        },
        "en": {
          "title": "Data sheet",
          "sku": "Item number",
          "ean": "EAN",
          "brand": "Brand",
          "revision": "Revision",
          "date": "As of",
          "description": "Description",
          "attributes": "Properties",
          "dimensions": "Dimensions and weight",
          "length": "Length",
          "width": "Width",
          "height": "Height",
          "weight": "Weight",
          "prices": "Prices",
          "sellPrice": "Selling price",
          "uvp": "Recommended retail price",
          "page": "Page"
        }
      }
    },
    "version": 1,
    "status": "active",
    "tags": [],
    "shares": [],
    "createdAt": "2026-10-07T12:24:30.662Z",
    "updatedAt": "2026-10-07T12:24:30.662Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/documenttemplates/6ac639fe2da0524d1aa29452",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "DocumentTemplates",
        "title": "MODEL_DOCUMENTTEMPLATE",
        "href": "https://api.ayoune.app/config/documenttemplates",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.documenttemplates"
      }
    ],
    "debugId": "6ac85dc8a5530da2364a8036",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_DOCUMENTTEMPLATE",
        "href": "https://api.ayoune.app/config/documenttemplates/6ac639fe2da0524d1aa29452/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_DOCUMENTTEMPLATE",
        "href": "https://api.ayoune.app/config/documenttemplates/6ac639fe2da0524d1aa29452",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.170.1",
      "core": "2026.368.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9564",
      "reset": "1791518517",
      "resetDate": "Fri Oct 09 2026"
    },
    "responseTime": 1496.954837,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

MethodePathBeschreibungRight
GET /documenttemplates Liste mit Filtern/Paginierung config.documenttemplates.view
GET /documenttemplates/:id Einzelner Datensatz config.documenttemplates.view
POST /documenttemplates Neuen Datensatz erstellen config.documenttemplates.new
PUT /documenttemplates Datensatz aktualisieren config.documenttemplates.edit
DELETE /documenttemplates/:id Datensatz löschen config.documenttemplates.delete

SDK

import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');

// Alle abrufen
const list = await ay.config.documentTemplates.find().limit(10).exec();

// Einzelnen Datensatz
const one = await ay.config.documentTemplates.findById('OBJECT_ID').exec();

// Erstellen
const created = await ay.config.documentTemplates.create({ name: 'Foo' });

Weiterführend