aYOUne
← Configuration API

SalesTemplates

Singular: SalesTemplate — Base URL: https://config-api.ayoune.app — Access: CRUD

play_circle Try it now beta

Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.

Example response (recorded) sample

A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.

{
  "payload": {
    "calculation": {
      "materialPurchasePrice": 0,
      "materialPurchasePriceWithOverheads": 0,
      "materialSurcharge": 0,
      "materialSellPrice": 0,
      "materialContributionMargin": 0,
      "materialContributionMarginPercentage": 0,
      "totalMaterial": 0,
      "wageInternal": 0,
      "wageExternal": 0,
      "wageSubcontractor": 0,
      "wageGlobal": 0,
      "wagePurchasePrice": 0,
      "wagePurchasePriceWithOverheads": 0,
      "wageSurcharge": 0,
      "wageSellPrice": 0,
      "wageContributionMargin": 0,
      "wageContributionMarginPercentage": 0,
      "totalWage": 0,
      "nettoPurchasePrice": 0,
      "nettoPurchasePriceWithOverheads": 0,
      "nettoSurcharge": 0,
      "nettoSellPrice": 0,
      "nettoContributionMargin": 0,
      "nettoContributionMarginPercentage": 0,
      "wageTime": 0,
      "wageTimeHours": 0,
      "wageTimeMinutes": 0,
      "groups": []
    },
    "_id": "65e0b063121b7d48fe157e83",
    "suppliers": [],
    "editors": [],
    "team": [],
    "coupon": "",
    "status": "Neu",
    "type": "Kurz",
    "text_pre": "",
    "text_post": "",
    "sent": false,
    "useTitles": false,
    "lockCalculation": false,
    "createdBy": "6045f4d25704710012485569",
    "pricedate": "2024-02-29T16:27:15.696Z",
    "titles": [],
    "positions": [],
    "createdAt": "2024-02-29T16:27:15.697Z",
    "updatedAt": "2024-02-29T16:27:15.697Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://config-api.ayoune.app/salestemplates/65e0b063121b7d48fe157e83",
        "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": "Projects",
        "title": "MODEL_PROJECT",
        "href": "https://api.ayoune.app/pm/projects",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pm.projects"
      },
      {
        "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"
      }
    ],
    "debugId": "6a62de8bf27d6098834b06ae",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_SALESTEMPLATE",
        "href": "https://api.ayoune.app/config/salestemplates/65e0b063121b7d48fe157e83/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_SALESTEMPLATE",
        "href": "https://api.ayoune.app/config/salestemplates/65e0b063121b7d48fe157e83/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.95.0",
      "core": "2026.258.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "623",
      "reset": "1784865648",
      "resetDate": "Fri Jul 24 2026"
    },
    "responseTime": 601.331611,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
GET /salestemplates List with filters/pagination config.salestemplates.view
GET /salestemplates/:id Single record config.salestemplates.view
POST /salestemplates Create new record config.salestemplates.new
PUT /salestemplates Update record config.salestemplates.edit
DELETE /salestemplates/:id Delete record config.salestemplates.delete

SDK

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

// List all
const list = await ay.config.salesTemplates.find().limit(10).exec();

// Single record
const one = await ay.config.salesTemplates.findById('OBJECT_ID').exec();

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

See also