← Configuration API
DocumentTemplates
Singular: DocumentTemplate — Base URL: https://config-api.ayoune.app — Access: CRUD
Try it now
beta
Response (live)
Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /documenttemplates |
List with filters/pagination | config.documenttemplates.view |
| GET | /documenttemplates/:id |
Single record | config.documenttemplates.view |
| POST | /documenttemplates |
Create new record | config.documenttemplates.new |
| PUT | /documenttemplates |
Update record | config.documenttemplates.edit |
| DELETE | /documenttemplates/:id |
Delete record | config.documenttemplates.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.config.documentTemplates.find().limit(10).exec();
// Single record
const one = await ay.config.documentTemplates.findById('OBJECT_ID').exec();
// Create
const created = await ay.config.documentTemplates.create({ name: 'Foo' });