← HR API
Positions
Singular: Position — Base URL: https://hr-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": "6ac9b53b99da55edcd8f12bc",
"name": "OCCASIONAL_ORANGE_JAR JAR BINKS",
"createdBy": "6045f4d25704710012485569",
"shares": [],
"createdAt": "2026-10-10T03:47:07.372Z",
"updatedAt": "2026-10-10T03:47:07.372Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://hr-api.ayoune.app/positions/6ac9b53b99da55edcd8f12bc",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "Departments",
"title": "MODEL_DEPARTMENT",
"href": "https://api.ayoune.app/config/departments",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.departments"
}
],
"debugId": "6ac9b53c99da55edcd8f12ec",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_POSITION",
"href": "https://api.ayoune.app/hr/positions/6ac9b53b99da55edcd8f12bc/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_POSITION",
"href": "https://api.ayoune.app/hr/positions/6ac9b53b99da55edcd8f12bc",
"method": "delete",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.34.1",
"core": "2026.368.1"
},
"rateLimit": {
"limit": "10000",
"remaining": "9722",
"reset": "1791607534",
"resetDate": "Sat Oct 10 2026"
},
"responseTime": 182.400545,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /positions |
List with filters/pagination | hr.positions.view |
| GET | /positions/:id |
Single record | hr.positions.view |
| POST | /positions |
Create new record | hr.positions.new |
| PUT | /positions |
Update record | hr.positions.edit |
| DELETE | /positions/:id |
Delete record | hr.positions.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.hr.positions.find().limit(10).exec();
// Single record
const one = await ay.hr.positions.findById('OBJECT_ID').exec();
// Create
const created = await ay.hr.positions.create({ name: 'Foo' });