← Production API
WorkCenters
Singular: WorkCenter — Base URL: https://production-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": {
"loc": {
"coordinates": []
},
"machines": [],
"_id": "65e0b1a6121b7d48fe159cd1",
"skills": [],
"workers": [],
"planedShifts": [],
"cords": [],
"createdBy": "6045f4d25704710012485569",
"courses": [],
"tools": [],
"alternativeWorkCenters": [],
"costs": [],
"shifts": [],
"createdAt": "2024-02-29T16:32:38.186Z",
"updatedAt": "2024-02-29T16:32:38.186Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://production-api.ayoune.app/workcenters/65e0b1a6121b7d48fe159cd1",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "ProductionLines",
"title": "MODEL_PRODUCTIONLINE",
"href": "https://api.ayoune.app/config/productionlines",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.productionlines"
},
{
"rel": "Locations",
"title": "MODEL_LOCATION",
"href": "https://api.ayoune.app/config/locations",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.locations"
},
{
"rel": "Departments",
"title": "MODEL_DEPARTMENT",
"href": "https://api.ayoune.app/config/departments",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.departments"
},
{
"rel": "CostCenters",
"title": "MODEL_COSTCENTER",
"href": "https://api.ayoune.app/accounting/costcenters",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "accounting.costcenters"
},
{
"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": "CostGroups",
"title": "MODEL_COSTGROUP",
"href": "https://api.ayoune.app/config/costgroups",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.costgroups"
},
{
"rel": "ProductionOrders",
"title": "MODEL_PRODUCTIONORDER",
"href": "https://api.ayoune.app/production/productionorders",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "production.productionorders"
}
],
"debugId": "6a6198a92f837abff56459ea",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_WORKCENTER",
"href": "https://api.ayoune.app/production/workcenters/65e0b1a6121b7d48fe159cd1/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_WORKCENTER",
"href": "https://api.ayoune.app/production/workcenters/65e0b1a6121b7d48fe159cd1/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.19.1",
"core": "2026.257.1"
},
"rateLimit": {
"limit": "2500",
"remaining": "2392",
"reset": "1784784540",
"resetDate": "Thu Jul 23 2026"
},
"responseTime": 198.620756,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /workcenters |
List with filters/pagination | production.workcenters.view |
| GET | /workcenters/:id |
Single record | production.workcenters.view |
| POST | /workcenters |
Create new record | production.workcenters.new |
| PUT | /workcenters |
Update record | production.workcenters.edit |
| DELETE | /workcenters/:id |
Delete record | production.workcenters.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.production.workCenters.find().limit(10).exec();
// Single record
const one = await ay.production.workCenters.findById('OBJECT_ID').exec();
// Create
const created = await ay.production.workCenters.create({ name: 'Foo' });