aYOUne
← Vertrieb API

PosOrders

Singular: PosOrder — Base-URL: https://sale-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": "6a9f974033636e7170d5bfec",
    "createdBy": "6045f4d25704710012485569",
    "status": "open",
    "subtotal": 0,
    "discountTotal": 0,
    "taxTotal": 0,
    "total": 0,
    "currency": "EUR",
    "paidTotal": 0,
    "tableLabel": "AWAKE_CYAN_FINIS VALORUM",
    "items": [],
    "payments": [],
    "shares": [],
    "createdAt": "2026-09-08T05:04:00.427Z",
    "updatedAt": "2026-09-08T05:04:02.505Z",
    "modifiedBy": "6045f4d25704710012485569"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://sale-api.ayoune.app/posorders/6a9f974033636e7170d5bfec",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "relations": [
      {
        "rel": "PosSessions",
        "title": "MODEL_POSSESSION",
        "href": "https://api.ayoune.app/sale/possessions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.possessions"
      },
      {
        "rel": "CashRegisters",
        "title": "MODEL_CASHREGISTER",
        "href": "https://api.ayoune.app/sale/cashregisters",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.cashregisters"
      },
      {
        "rel": "Customers",
        "title": "MODEL_CUSTOMER",
        "href": "https://api.ayoune.app/global/customers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "global.customers"
      },
      {
        "rel": "Receipts",
        "title": "MODEL_RECEIPT",
        "href": "https://api.ayoune.app/sale/receipts",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.receipts"
      },
      {
        "rel": "Invoices",
        "title": "MODEL_INVOICE",
        "href": "https://api.ayoune.app/sale/invoices",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.invoices"
      },
      {
        "rel": "PosOrders",
        "title": "MODEL_POSORDER",
        "href": "https://api.ayoune.app/sale/posorders",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.posorders"
      }
    ],
    "debugId": "6a9f974333636e7170d5c039",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_POSORDER",
        "href": "https://api.ayoune.app/sale/posorders/6a9f974033636e7170d5bfec/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_POSORDER",
        "href": "https://api.ayoune.app/sale/posorders/6a9f974033636e7170d5bfec",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.61.0",
      "core": "2026.331.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2039",
      "reset": "1788847255",
      "resetDate": "Tue Sep 08 2026"
    },
    "responseTime": 91.142519,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend