aYOUne
← Configuration API

SubCompanies

Singular: SubCompany — Base URL: https://config-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)

play_circle Try it now beta

Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.

Endpoints

MethodPathDescriptionRight
GET /subcompanies List with filters/pagination config.subcompanies.view
GET /subcompanies/:id Single record config.subcompanies.view
POST /subcompanies Create new record config.subcompanies.new
PUT /subcompanies Update record config.subcompanies.edit
DELETE /subcompanies/:id Delete record config.subcompanies.delete

SDK

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

// List all
const list = await ay.config.subCompanies.find().limit(10).exec();

// Single record
const one = await ay.config.subCompanies.findById('OBJECT_ID').exec();

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

See also