← Sales API
Lots
Singular: Lot — Base URL: https://sale-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)
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": "6ad57884bd887cc79f9e2404",
"nbr": "ABN-CH-1",
"product": "6ad577b31e7a66672883994b",
"createdAt": "2026-10-19T01:55:15.985Z",
"expirationDate": "2027-12-31T00:00:00.000Z",
"ext_nbr": "ABN-CH-1",
"hasExpirationDate": true,
"isIncomeLot": true,
"logs": [],
"scanID": "8X3HE2N4",
"serialNumbers": [],
"shares": [],
"status": "released",
"storageArea": "6a92542aecd9b976c4676895",
"updatedAt": "2026-10-19T01:55:57.895Z",
"user": "5a76d07e2d8b3270ff6df587",
"warehouse": "6ab22702497e7e1a3405689c"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://sale-api.ayoune.app/lots/6ad57884bd887cc79f9e2404",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "Products",
"title": "MODEL_PRODUCT",
"href": "https://api.ayoune.app/pim/products/6ad577b31e7a66672883994b",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "pim.products"
},
{
"rel": "Warehouses",
"title": "MODEL_WAREHOUSE",
"href": "https://api.ayoune.app/warehouse/warehouses/6ab22702497e7e1a3405689c",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "warehouse.warehouses"
},
{
"rel": "StorageAreas",
"title": "MODEL_STORAGEAREA",
"href": "https://api.ayoune.app/warehouse/storageareas/6a92542aecd9b976c4676895",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "warehouse.storageareas"
}
],
"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"
},
{
"rel": "Warehouses",
"title": "MODEL_WAREHOUSE",
"href": "https://api.ayoune.app/warehouse/warehouses",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "warehouse.warehouses"
},
{
"rel": "StorageAreas",
"title": "MODEL_STORAGEAREA",
"href": "https://api.ayoune.app/warehouse/storageareas",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "warehouse.storageareas"
},
{
"rel": "Shippings",
"title": "MODEL_SHIPPING",
"href": "https://api.ayoune.app/sale/shippings",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "sale.shippings"
},
{
"rel": "Invoices",
"title": "MODEL_INVOICE",
"href": "https://api.ayoune.app/sale/invoices",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "sale.invoices"
},
{
"rel": "IncomeInvoices",
"title": "MODEL_INCOMEINVOICE",
"href": "https://api.ayoune.app/purchase/incomeinvoices",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "purchase.incomeinvoices"
},
{
"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"
},
{
"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": "GoodsReceipts",
"title": "MODEL_GOODSRECEIPT",
"href": "https://api.ayoune.app/purchase/goodsreceipts",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "purchase.goodsreceipts"
},
{
"rel": "ProductionOrders",
"title": "MODEL_PRODUCTIONORDER",
"href": "https://api.ayoune.app/production/productionorders",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "production.productionorders"
},
{
"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": "WorkCenters",
"title": "MODEL_WORKCENTER",
"href": "https://api.ayoune.app/production/workcenters",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "production.workcenters"
},
{
"rel": "Machines",
"title": "MODEL_MACHINE",
"href": "https://api.ayoune.app/config/machines",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.machines"
},
{
"rel": "ProductionResources",
"title": "MODEL_PRODUCTIONRESOURCE",
"href": "https://api.ayoune.app/production/productionresources",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "production.productionresources"
}
],
"debugId": "6aded7292f9a946a04693d4f",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_LOT",
"href": "https://api.ayoune.app/sale/lots/6ad57884bd887cc79f9e2404/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_LOT",
"href": "https://api.ayoune.app/sale/lots/6ad57884bd887cc79f9e2404",
"method": "delete",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.61.0",
"core": "2026.388.0"
},
"rateLimit": {
"limit": "10000",
"remaining": "9793",
"reset": "1792992490",
"resetDate": "Mon Oct 26 2026"
},
"responseTime": 112.602069,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /lots |
List with filters/pagination | sale.lots.view |
| GET | /lots/:id |
Single record | sale.lots.view |
| POST | /lots |
Create new record | sale.lots.new |
| PUT | /lots |
Update record | sale.lots.edit |
| DELETE | /lots/:id |
Delete record | sale.lots.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.sale.lots.find().limit(10).exec();
// Single record
const one = await ay.sale.lots.findById('OBJECT_ID').exec();
// Create
const created = await ay.sale.lots.create({ name: 'Foo' });