← Purchase API
IncomeInvoices
Singular: IncomeInvoice — Base URL: https://purchase-api.ayoune.app — Access: CRUD
Try it now
beta
Response (live)
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": "65e0b1a9121b7d48fe159d1f",
"createdBy": "6045f4d25704710012485569",
"positions": [],
"taxes": [],
"createdAt": "2024-02-29T16:32:41.222Z",
"updatedAt": "2024-02-29T16:32:41.222Z",
"shortID": "FBKPKPW"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://purchase-api.ayoune.app/incomeinvoices/65e0b1a9121b7d48fe159d1f",
"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": "GoodsReceipts",
"title": "MODEL_GOODSRECEIPT",
"href": "https://api.ayoune.app/purchase/goodsreceipts",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "purchase.goodsreceipts"
},
{
"rel": "SupplierOrders",
"title": "MODEL_SUPPLIERORDER",
"href": "https://api.ayoune.app/purchase/supplierorders",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "purchase.supplierorders"
},
{
"rel": "CostCenters",
"title": "MODEL_COSTCENTER",
"href": "https://api.ayoune.app/accounting/costcenters",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "accounting.costcenters"
}
],
"debugId": "6a6198b61496f64392e2fd86",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_INCOMEINVOICE",
"href": "https://api.ayoune.app/purchase/incomeinvoices/65e0b1a9121b7d48fe159d1f/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_INCOMEINVOICE",
"href": "https://api.ayoune.app/purchase/incomeinvoices/65e0b1a9121b7d48fe159d1f/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.10.0",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "2481",
"reset": "1784784576",
"resetDate": "Thu Jul 23 2026"
},
"responseTime": 304.902983,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /incomeinvoices |
List with filters/pagination | purchase.incomeinvoices.view |
| GET | /incomeinvoices/:id |
Single record | purchase.incomeinvoices.view |
| POST | /incomeinvoices |
Create new record | purchase.incomeinvoices.new |
| PUT | /incomeinvoices |
Update record | purchase.incomeinvoices.edit |
| DELETE | /incomeinvoices/:id |
Delete record | purchase.incomeinvoices.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.purchase.incomeInvoices.find().limit(10).exec();
// Single record
const one = await ay.purchase.incomeInvoices.findById('OBJECT_ID').exec();
// Create
const created = await ay.purchase.incomeInvoices.create({ name: 'Foo' });