aYOUne
← Configuration API

Affiliates

Singular: Affiliate — Base URL: https://config-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.

Example response (recorded) sample

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

{
  "payload": {
    "payout": {
      "schedule": "monthly"
    },
    "kyc": {
      "status": "not-started",
      "documents": []
    },
    "subjectType": "consumer",
    "codeLocked": false,
    "status": "active",
    "tier_level": 1,
    "ancestors": [],
    "authMethod": "consumer",
    "allowedEmbedDomains": [],
    "_id": "65e0afd8121b7d48fe155b56",
    "name": "",
    "type": "STOREFire",
    "key": "",
    "token": "",
    "createdBy": "6045f4d25704710012485569",
    "createdAt": "2024-02-29T16:24:56.649Z",
    "updatedAt": "2024-02-29T16:24:56.649Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/affiliates/65e0afd8121b7d48fe155b56",
        "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"
      },
      {
        "rel": "CommissionGroups",
        "title": "MODEL_COMMISSIONGROUP",
        "href": "https://api.ayoune.app/config/commissiongroups",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.commissiongroups"
      }
    ],
    "debugId": "6a62dcc230b7d778029e53e9",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_AFFILIATE",
        "href": "https://api.ayoune.app/config/affiliates/65e0afd8121b7d48fe155b56/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_AFFILIATE",
        "href": "https://api.ayoune.app/config/affiliates/65e0afd8121b7d48fe155b56/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.94.0",
      "core": "2026.258.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2442",
      "reset": "1784865648",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 198.034628,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also