aYOUne
← Vertrieb API

Invoices

Singular: Invoice — 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": ""
    },
    "_id": "65e0b1ee121b7d48fe15a49f",
    "suppliers": [],
    "team": [],
    "locked": false,
    "pos": false,
    "final_invoice": false,
    "deposit_invoice": false,
    "proforma_invoice": false,
    "stock_booked": false,
    "paid": false,
    "directDebitCreated": false,
    "loyalty_booked": false,
    "commission_booked": false,
    "first": false,
    "deposits": [],
    "type": "Kurz",
    "text_pre": "",
    "text_post": "",
    "otherBillingAddress": false,
    "posting_period": "",
    "useTitles": false,
    "totalTime": 0,
    "totalTimeHours": 0,
    "totalTimeDays": 0,
    "totalTimeWeeks": 0,
    "totalTimeMonths": 0,
    "totalWeight": 0,
    "specialRemarks": "",
    "final_discount_percent": 0,
    "final_discount_percent_amount": 0,
    "coupon_discount": 0,
    "final_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,
    "setupFee": 0,
    "gross_profit": 0,
    "monthly_part": 0,
    "total_part": 0,
    "reminderStep": 0,
    "collectionProcedure": false,
    "currency": "EUR",
    "foreignCountry": false,
    "watchers": [],
    "createdBy": "6045f4d25704710012485569",
    "shares": [],
    "debit": [],
    "credit": [],
    "pricedate": "2024-02-29T16:33:50.158Z",
    "performancedate": "2024-02-29T16:33:50.158Z",
    "performancedate_from": "2024-02-29T16:33:50.158Z",
    "performancedate_to": "2024-02-29T16:33:50.158Z",
    "titles": [],
    "positions": [],
    "taxes": [],
    "comments": [],
    "createdAt": "2024-02-29T16:33:50.158Z",
    "updatedAt": "2024-02-29T16:33:50.158Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://sale-api.ayoune.app/invoices/65e0b1ee121b7d48fe15a49f",
        "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"
      },
      {
        "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": "ChainStores",
        "title": "MODEL_CHAINSTORE",
        "href": "https://api.ayoune.app/config/chainstores",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.chainstores"
      },
      {
        "rel": "Cashiers",
        "title": "MODEL_CASHIER",
        "href": "https://api.ayoune.app/config/cashiers",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "config.cashiers"
      },
      {
        "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": "CreditNotes",
        "title": "MODEL_CREDITNOTE",
        "href": "https://api.ayoune.app/sale/creditnotes",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.creditnotes"
      },
      {
        "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": "Contracts",
        "title": "MODEL_CONTRACT",
        "href": "https://api.ayoune.app/sale/contracts",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.contracts"
      },
      {
        "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": "Assignments",
        "title": "MODEL_ASSIGNMENT",
        "href": "https://api.ayoune.app/sale/assignments",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.assignments"
      },
      {
        "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": "PaymentTransactions",
        "title": "MODEL_PAYMENTTRANSACTION",
        "href": "https://api.ayoune.app/payments/paymenttransactions",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "payments.paymenttransactions"
      },
      {
        "rel": "Documents",
        "title": "MODEL_DOCUMENT",
        "href": "https://api.ayoune.app/crm/documents",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.documents"
      },
      {
        "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": "6a61991501c854403a7ccc40",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_INVOICE",
        "href": "https://api.ayoune.app/sale/invoices/65e0b1ee121b7d48fe15a49f/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_INVOICE",
        "href": "https://api.ayoune.app/sale/invoices/65e0b1ee121b7d48fe15a49f/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.37.2",
      "core": "2026.257.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2370",
      "reset": "1784784645",
      "resetDate": "Thu Jul 23 2026"
    },
    "responseTime": 55.218818,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpunkte

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

SDK

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

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

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

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

Weiterführend