aYOUne
← Marketing API

Collections

Singular: Collection — Base URL: https://marketing-api.ayoune.app — Access: CRUD

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 /collections List with filters/pagination marketing.collections.view
GET /collections/:id Single record marketing.collections.view
POST /collections Create new record marketing.collections.new
PUT /collections Update record marketing.collections.edit
DELETE /collections/:id Delete record marketing.collections.delete

SDK

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

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

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

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

See also