aYOUne
← Marketing API

Widgets

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

play_circle 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": "65e0b153121b7d48fe1594d8",
    "type": "slider",
    "title": "Vergib einen Titel",
    "background_color": "#FFFFFF",
    "border_color": "#000000",
    "border_radius": 0,
    "font_color": "#000000",
    "button_color": "#FF0000",
    "button_txt": "zum Produkt",
    "font_size": 10,
    "font_type": "Arial",
    "width": 350,
    "height": 300,
    "count": 10,
    "moneysign": "€",
    "products": [],
    "categorys": "-,-",
    "brands": "-,-",
    "show_price": 1,
    "override": 1,
    "locale": "de_DE",
    "isDraft": true,
    "createdBy": "6045f4d25704710012485569",
    "createdAt": "2024-02-29T16:31:15.248Z",
    "updatedAt": "2024-02-29T16:31:15.248Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://marketing-api.ayoune.app/widgets/65e0b153121b7d48fe1594d8",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Affiliates",
        "title": "MODEL_AFFILIATE",
        "href": "https://api.ayoune.app/config/affiliates",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.affiliates"
      }
    ],
    "debugId": "6a950a30f495f9ad5b0599a7",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_WIDGET",
        "href": "https://api.ayoune.app/marketing/widgets/65e0b153121b7d48fe1594d8/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_WIDGET",
        "href": "https://api.ayoune.app/marketing/widgets/65e0b153121b7d48fe1594d8",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.38.0",
      "core": "2026.325.2"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2490",
      "reset": "1788155967",
      "resetDate": "Mon Aug 31 2026"
    },
    "responseTime": 98.926844,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend