Zum Inhalt springen
aYOUne
← Konfiguration API

SubCompanies

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

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": "65e0b076121b7d48fe1580a5",
    "company": "",
    "street": "",
    "zip": "",
    "city": "",
    "country": "Deutschland",
    "state": "",
    "phone": "",
    "fax": "",
    "cell": "",
    "website": "",
    "note": "",
    "isDraft": true,
    "createdBy": "6045f4d25704710012485569",
    "createdAt": "2024-02-29T16:27:34.742Z",
    "updatedAt": "2024-02-29T16:27:34.742Z",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/subcompanies/65e0b076121b7d48fe1580a5",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "SubCompanies",
        "title": "MODEL_SUBCOMPANY",
        "href": "https://api.ayoune.app/config/subcompanies",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.subcompanies"
      },
      {
        "rel": "Images",
        "title": "MODEL_IMAGE",
        "href": "https://api.ayoune.app/cms/images",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "cms.images"
      }
    ],
    "debugId": "6ac9b2782493408cc113b0e1",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_SUBCOMPANY",
        "href": "https://api.ayoune.app/config/subcompanies/65e0b076121b7d48fe1580a5/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_SUBCOMPANY",
        "href": "https://api.ayoune.app/config/subcompanies/65e0b076121b7d48fe1580a5",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.170.1",
      "core": "2026.368.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9158",
      "reset": "1791604919",
      "resetDate": "Sat Oct 10 2026"
    },
    "responseTime": 203.175586,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend