aYOUne
← Affiliate API

AffiliateCampaigns

Singular: AffiliateCampaign — Base-URL: https://affiliate-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": "65e07d2811cb6213d99d051b",
    "products": [],
    "custom_url": false,
    "override_product_banner": true,
    "override_banner": true,
    "override_widgets": true,
    "override_stores": true,
    "override_search_box": true,
    "createdBy": "6045f4d25704710012485569",
    "start": "2024-02-29T12:48:40.431Z",
    "end": "2024-02-29T12:48:40.431Z",
    "createdAt": "2024-02-29T12:48:40.432Z",
    "updatedAt": "2024-02-29T12:48:40.432Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://affiliate-api.ayoune.app/affiliatecampaigns/65e07d2811cb6213d99d051b",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [],
    "debugId": "6a8e5f43d193abb7a0e15472",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_AFFILIATECAMPAIGN",
        "href": "https://api.ayoune.app/affiliate/affiliatecampaigns/65e07d2811cb6213d99d051b/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_AFFILIATECAMPAIGN",
        "href": "https://api.ayoune.app/affiliate/affiliatecampaigns/65e07d2811cb6213d99d051b/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.6.5",
      "core": "2026.287.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2466",
      "reset": "1787718987",
      "resetDate": "Wed Aug 26 2026"
    },
    "responseTime": 84.658218,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend