aYOUne
← Purchase API

SupplierRequests

Singular: SupplierRequest — 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": "65ce1398b98a6f26ab9f7f42",
    "status": "Neu",
    "done": false,
    "accepted": false,
    "declined": false,
    "archived": false,
    "requested": false,
    "hasDuration": false,
    "createdBy": "6045f4d25704710012485569",
    "positions": [],
    "deadline": "2024-02-15T13:37:28.869Z",
    "first_start_date": "2024-02-15T13:37:28.869Z",
    "last_end_date": "2024-02-15T13:37:28.869Z",
    "createdAt": "2024-02-15T13:37:28.871Z",
    "updatedAt": "2024-02-15T13:37:28.871Z"
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://purchase-api.ayoune.app/supplierrequests/65ce1398b98a6f26ab9f7f42",
        "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": "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": "Assignments",
        "title": "MODEL_ASSIGNMENT",
        "href": "https://api.ayoune.app/sale/assignments",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "sale.assignments"
      }
    ],
    "debugId": "6a8291d21c8d7eeae3944b8d",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_SUPPLIERREQUEST",
        "href": "https://api.ayoune.app/purchase/supplierrequests/65ce1398b98a6f26ab9f7f42/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_SUPPLIERREQUEST",
        "href": "https://api.ayoune.app/purchase/supplierrequests/65ce1398b98a6f26ab9f7f42/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.17.5",
      "core": "2026.287.1"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2316",
      "reset": "1786945450",
      "resetDate": "Mon Aug 17 2026"
    },
    "responseTime": 16.980109,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

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

SDK

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

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

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

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

See also