aYOUne
← Einkauf API

SupplierProducts

Singular: SupplierProduct — Base-URL: https://purchase-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": "65e0b1b2121b7d48fe159e18",
    "keywords": [],
    "tags": [],
    "brands": [],
    "categories": [],
    "themas": [],
    "createdBy": "6045f4d25704710012485569",
    "prices": [],
    "attachments": [],
    "createdAt": "2024-02-29T16:32:50.375Z",
    "updatedAt": "2024-02-29T16:32:50.375Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://purchase-api.ayoune.app/supplierproducts/65e0b1b2121b7d48fe159e18",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      }
    ],
    "debugId": "6a8291cd1c8d7eeae39449eb",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_SUPPLIERPRODUCT",
        "href": "https://api.ayoune.app/purchase/supplierproducts/65e0b1b2121b7d48fe159e18/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_SUPPLIERPRODUCT",
        "href": "https://api.ayoune.app/purchase/supplierproducts/65e0b1b2121b7d48fe159e18/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.17.5",
      "core": "2026.287.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2333",
      "reset": "1786945450",
      "resetDate": "Mon Aug 17 2026"
    },
    "responseTime": 212.595846,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend