← Vertrieb API
PosOrders
Singular: PosOrder — Base-URL: https://sale-api.ayoune.app — Zugriff: CRUD
Jetzt ausprobieren
beta
Response (live)
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": "6a61994001c854403a7cd909",
"createdBy": "6045f4d25704710012485569",
"status": "open",
"subtotal": 0,
"discountTotal": 0,
"taxTotal": 0,
"total": 0,
"currency": "EUR",
"paidTotal": 0,
"items": [],
"payments": [],
"createdAt": "2026-07-23T04:32:00.064Z",
"updatedAt": "2026-07-23T04:32:00.064Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://sale-api.ayoune.app/posorders/6a61994001c854403a7cd909",
"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": "6a61994101c854403a7cd956",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_POSORDER",
"href": "https://api.ayoune.app/sale/posorders/6a61994001c854403a7cd909/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_POSORDER",
"href": "https://api.ayoune.app/sale/posorders/6a61994001c854403a7cd909/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.37.2",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "2170",
"reset": "1784784645",
"resetDate": "Thu Jul 23 2026"
},
"responseTime": 112.682157,
"code": 200,
"status": "success",
"error": false
}
}
Endpunkte
| Methode | Path | Beschreibung | Right |
|---|---|---|---|
| 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' });