aYOUne
← Purchase API

SupplierProducts

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

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": {
    "_id": "65e0b1b2121b7d48fe159e18",
    "keywords": [],
    "tags": [],
    "brands": [],
    "categories": [],
    "themas": [],
    "createdBy": "6045f4d25704710012485569",
    "prices": [],
    "attachments": [],
    "createdAt": "2024-02-29T16:32:50.375Z",
    "updatedAt": "2024-02-29T16:32:50.375Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://purchase-api.ayoune.app/supplierproducts/65e0b1b2121b7d48fe159e18",
        "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"
      }
    ],
    "debugId": "6a8291cd1c8d7eeae39449eb",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_SUPPLIERPRODUCT",
        "href": "https://api.ayoune.app/purchase/supplierproducts/65e0b1b2121b7d48fe159e18/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_SUPPLIERPRODUCT",
        "href": "https://api.ayoune.app/purchase/supplierproducts/65e0b1b2121b7d48fe159e18/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.17.5",
      "core": "2026.287.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2333",
      "reset": "1786945450",
      "resetDate": "Mon Aug 17 2026"
    },
    "responseTime": 212.595846,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also