aYOUne
← Vertrieb API

Assignments

Singular: Assignment — Base-URL: https://sale-api.ayoune.app — Zugriff: CRUD

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": {
    "shippingAddress": {
      "address_additional": ""
    },
    "text_pre": "",
    "final_discount_percent_amount": 0,
    "currency": "EUR",
    "_id": "61de42754970427b9c5a38c4",
    "suppliers": [],
    "done": false,
    "locked": false,
    "editors": [],
    "team": [],
    "confirmed": false,
    "destinationCountries": [],
    "destinationCities": [],
    "destinationCity": [],
    "groups": [],
    "othergroups": [],
    "skus": [],
    "shopOrder": false,
    "shopOrderNbr": "false",
    "interestchannels": [],
    "stock_booked": false,
    "hasQuota": false,
    "hasDuration": false,
    "hasCheckLists": false,
    "hasSupplierFeedback": false,
    "hasRequirements": false,
    "needsProduction": false,
    "needsPurchase": false,
    "hasProductionOrders": false,
    "insuranceBooked": false,
    "status": "Neu",
    "deposits": [],
    "type": "Kurz",
    "text_post": "",
    "delivered": false,
    "useTitles": false,
    "totalTime": 0,
    "totalTimeHours": 0,
    "totalTimeDays": 0,
    "totalTimeWeeks": 0,
    "totalTimeMonths": 0,
    "totalWeight": 0,
    "materialLocked": false,
    "specialRemarks": "",
    "final_discount_percent": 0,
    "final_discount_percent_ammount": 0,
    "final_discount": 0,
    "coupon_discount": 0,
    "shippingCosts": 0,
    "sum": 0,
    "totalDiscount": 0,
    "net_total": 0,
    "net_total_1": 0,
    "net_total_2": 0,
    "tax_1": 0,
    "tax_2": 0,
    "totalTax": 0,
    "total": 0,
    "monthly_part": 0,
    "total_part": 0,
    "external_monthly_part": 0,
    "external_total_part": 0,
    "foreignCountry": false,
    "watchers": [],
    "shares": [],
    "pricedate": "2022-01-12T02:52:37.830Z",
    "titles": [],
    "positions": [],
    "material": [],
    "machines": [],
    "workCenters": [],
    "skills": [],
    "created": "2022-01-12T02:52:37.830Z",
    "taxes": [],
    "comments": [],
    "nbr": 2,
    "user": "5ee06fc3860473001cfb290e",
    "pricegroup": "5ee06fc6860473001cfb2917",
    "paymentcondition": "5ee06fc6860473001cfb2919",
    "createdAt": "2022-01-12T02:52:37.831Z",
    "updatedAt": "2022-01-12T02:52:37.831Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://sale-api.ayoune.app/assignments/61de42754970427b9c5a38c4",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "PriceGroups",
        "title": "MODEL_PRICEGROUP",
        "href": "https://api.ayoune.app/config/pricegroups/5ee06fc6860473001cfb2917",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.pricegroups"
      },
      {
        "rel": "PaymentGroups",
        "title": "MODEL_PAYMENTGROUP",
        "href": "https://api.ayoune.app/config/paymentgroups/5ee06fc6860473001cfb2919",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.paymentgroups"
      }
    ],
    "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"
      },
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      },
      {
        "rel": "Shops",
        "title": "MODEL_SHOP",
        "href": "https://api.ayoune.app/ecommerce/shops",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ecommerce.shops"
      },
      {
        "rel": "Coupons",
        "title": "MODEL_COUPON",
        "href": "https://api.ayoune.app/marketing/coupons",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "marketing.coupons"
      },
      {
        "rel": "Transactions",
        "title": "MODEL_TRANSACTION",
        "href": "https://api.ayoune.app/ecommerce/transactions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "ecommerce.transactions"
      },
      {
        "rel": "CalendarEntries",
        "title": "MODEL_CALENDARENTRY",
        "href": "https://api.ayoune.app/crm/calendarentries",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.calendarentries"
      },
      {
        "rel": "Opportunities",
        "title": "MODEL_OPPORTUNITY",
        "href": "https://api.ayoune.app/sale/opportunities",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.opportunities"
      },
      {
        "rel": "Projects",
        "title": "MODEL_PROJECT",
        "href": "https://api.ayoune.app/pm/projects",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pm.projects"
      },
      {
        "rel": "Offers",
        "title": "MODEL_OFFER",
        "href": "https://api.ayoune.app/sale/offers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.offers"
      },
      {
        "rel": "Contracts",
        "title": "MODEL_CONTRACT",
        "href": "https://api.ayoune.app/sale/contracts",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.contracts"
      },
      {
        "rel": "ProductionOrders",
        "title": "MODEL_PRODUCTIONORDER",
        "href": "https://api.ayoune.app/production/productionorders",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "production.productionorders"
      },
      {
        "rel": "InternalOrders",
        "title": "MODEL_INTERNALORDER",
        "href": "https://api.ayoune.app/purchase/internalorders",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "purchase.internalorders"
      },
      {
        "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": "Shippings",
        "title": "MODEL_SHIPPING",
        "href": "https://api.ayoune.app/sale/shippings",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.shippings"
      },
      {
        "rel": "Shippments",
        "title": "MODEL_SHIPPMENT",
        "href": "https://api.ayoune.app/sale/shippments",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.shippments"
      },
      {
        "rel": "PriceGroups",
        "title": "MODEL_PRICEGROUP",
        "href": "https://api.ayoune.app/config/pricegroups",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.pricegroups"
      },
      {
        "rel": "DiscountGroups",
        "title": "MODEL_DISCOUNTGROUP",
        "href": "https://api.ayoune.app/config/discountgroups",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.discountgroups"
      },
      {
        "rel": "PaymentGroups",
        "title": "MODEL_PAYMENTGROUP",
        "href": "https://api.ayoune.app/config/paymentgroups",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.paymentgroups"
      },
      {
        "rel": "Documents",
        "title": "MODEL_DOCUMENT",
        "href": "https://api.ayoune.app/crm/documents",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.documents"
      }
    ],
    "debugId": "6a6198fb01c854403a7cc459",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_ASSIGNMENT",
        "href": "https://api.ayoune.app/sale/assignments/61de42754970427b9c5a38c4/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_ASSIGNMENT",
        "href": "https://api.ayoune.app/sale/assignments/61de42754970427b9c5a38c4/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.37.2",
      "core": "2026.257.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2481",
      "reset": "1784784645",
      "resetDate": "Thu Jul 23 2026"
    },
    "responseTime": 297.982732,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend