Skip to content
aYOUne
← Purchase API

SupplierAgreements

Singular: SupplierAgreement — Base URL: https://purchase-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)

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": {
    "marketplace": {
      "provider": "amazon",
      "sellerExternalId": "Beispiel-Händler GmbH",
      "lastSyncedAt": "2026-10-01T23:49:03.277Z",
      "productUrl": "",
      "sellerName": "Beispiel-Händler GmbH",
      "source": "plugin-scrape"
    },
    "_id": "6abef16f3e4ac8da65834a6c",
    "_productID": "6abef16e3e4ac8da65834a68",
    "_consumerID": "6abef16e3e4ac8da65834a6a",
    "avgPrice": 9.95,
    "comments": [],
    "createdAt": "2026-10-01T23:49:03.278Z",
    "maxPrice": 0,
    "minPrice": 0,
    "prices": [
      {
        "valid_from": "2026-09-20T10:00:00.000Z",
        "valid_to": null,
        "from": 1,
        "to": 99,
        "purchase": 8.36,
        "freight": 0,
        "transport": 0,
        "postage": 0,
        "packaging": 0,
        "insurance": 0,
        "customs": 0,
        "others": 0,
        "net": 8.36,
        "gross": 9.95,
        "tax": 19,
        "amount": 1,
        "perUnit": 1,
        "deliveryTime": 5,
        "currency": "EUR",
        "dynamicPrice": false,
        "shares": []
      }
    ],
    "priority": 1,
    "shares": [],
    "supplierSku": "B0BEISPIEL1",
    "tax": 19,
    "updatedAt": "2026-10-01T23:49:03.293Z",
    "useForRequests": false,
    "watchers": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://purchase-api.ayoune.app/supplieragreements/6abef16f3e4ac8da65834a6c",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "Consumers",
        "title": "MODEL_CONSUMER",
        "href": "https://api.ayoune.app/crm/consumers/6abef16e3e4ac8da65834a6a",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.consumers"
      },
      {
        "rel": "Products",
        "title": "MODEL_PRODUCT",
        "href": "https://api.ayoune.app/pim/products/6abef16e3e4ac8da65834a68",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pim.products"
      }
    ],
    "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": "Products",
        "title": "MODEL_PRODUCT",
        "href": "https://api.ayoune.app/pim/products",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "pim.products"
      }
    ],
    "debugId": "6ac9c33557e1a6a13fa5acb7",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_SUPPLIERAGREEMENT",
        "href": "https://api.ayoune.app/purchase/supplieragreements/6abef16f3e4ac8da65834a6c/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_SUPPLIERAGREEMENT",
        "href": "https://api.ayoune.app/purchase/supplieragreements/6abef16f3e4ac8da65834a6c",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.19.0",
      "core": "2026.365.0"
    },
    "rateLimit": {
      "limit": "10000",
      "remaining": "9868",
      "reset": "1791611150",
      "resetDate": "Sat Oct 10 2026"
    },
    "responseTime": 185.514309,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also