Skip to content
aYOUne
← Affiliate API

AffiliateAttributions

Singular: AffiliateAttribution — Base URL: https://affiliate-api.ayoune.app — Access: read-only — Machine-readable spec (JSON · YAML)

Try it now beta

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

Example response (recorded) sample

A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.

{
  "payload": {
    "_id": "6ada03a8a23769cfc0da995d",
    "visitorId": "abnahme-fp-1792672680585",
    "_affiliateID": "6a9ce2ef03989c22cd55e216",
    "attributionMode": "last-click",
    "cookieToken": "***",
    "createdAt": "2026-10-22T12:38:00.729Z",
    "expiresAt": "2026-11-21T12:38:00.727Z",
    "firstSeenAt": "2026-10-22T12:38:00.727Z",
    "lastTouchAt": "2026-10-22T12:38:00.727Z",
    "shares": [],
    "updatedAt": "2026-10-22T12:38:00.905Z",
    "consumedAt": "2026-10-22T12:38:00.839Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://affiliate-api.ayoune.app/affiliateattributions/6ada03a8a23769cfc0da995d",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "Affiliates",
        "title": "MODEL_AFFILIATE",
        "href": "https://api.ayoune.app/config/affiliates/6a9ce2ef03989c22cd55e216",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.affiliates"
      }
    ],
    "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"
      },
      {
        "rel": "AffiliateCampaigns",
        "title": "MODEL_AFFILIATECAMPAIGN",
        "href": "https://api.ayoune.app/affiliate/affiliatecampaigns",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "affiliate.affiliatecampaigns"
      }
    ],
    "debugId": "6adec396ef7776bee00c03df",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_AFFILIATEATTRIBUTION",
        "href": "https://api.ayoune.app/affiliate/affiliateattributions/6ada03a8a23769cfc0da995d/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_AFFILIATEATTRIBUTION",
        "href": "https://api.ayoune.app/affiliate/affiliateattributions/6ada03a8a23769cfc0da995d",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.6.5",
      "core": "2026.388.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9703",
      "reset": "1792987462",
      "resetDate": "Mon Oct 26 2026"
    },
    "responseTime": 100.170489,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
GET /affiliateattributions List with filters/pagination affiliate.attributions.view
GET /affiliateattributions/:id Single record by ID affiliate.attributions.view

SDK

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

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

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

See also