aYOUne
← HR API

Payslips

Singular: Payslip — Base URL: https://hr-api.ayoune.app — Access: read-onlyMachine-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": "6a730ab649e8c09f08a92b1c",
    "_employee": "6a618f4b26b6c912cdf85507",
    "_payrollRun": "6a730a3f6da0f318dcca5a24",
    "createdAt": "2026-08-05T10:04:38.721Z",
    "employerCost": 350000,
    "gross": 350000,
    "isDraft": true,
    "net": 350000,
    "positions": [
      {
        "text": "Grundgehalt",
        "amount": 350000,
        "isDraft": true
      }
    ],
    "updatedAt": "2026-08-05T10:14:58.876Z",
    "_document": "6a730d2249e8c09f08a92c66",
    "shares": []
  },
  "meta": {
    "links": [
      {
        "rel": "self",
        "href": "https://hr-api.ayoune.app/payslips/6a730ab649e8c09f08a92b1c",
        "method": "get",
        "title": "GET",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "PayrollRuns",
        "title": "MODEL_PAYROLLRUN",
        "href": "https://api.ayoune.app/hr/payrollruns/6a730a3f6da0f318dcca5a24",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "hr.payrollruns"
      },
      {
        "rel": "Employees",
        "title": "MODEL_EMPLOYEE",
        "href": "https://api.ayoune.app/hr/employees/6a618f4b26b6c912cdf85507",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "hr.employees"
      },
      {
        "rel": "Documents",
        "title": "MODEL_DOCUMENT",
        "href": "https://api.ayoune.app/crm/documents/6a730d2249e8c09f08a92c66",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.documents"
      }
    ],
    "relations": [
      {
        "rel": "PayrollRuns",
        "title": "MODEL_PAYROLLRUN",
        "href": "https://api.ayoune.app/hr/payrollruns",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "hr.payrollruns"
      },
      {
        "rel": "Employees",
        "title": "MODEL_EMPLOYEE",
        "href": "https://api.ayoune.app/hr/employees",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "hr.employees"
      },
      {
        "rel": "Documents",
        "title": "MODEL_DOCUMENT",
        "href": "https://api.ayoune.app/crm/documents",
        "method": "get",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ],
        "right": "crm.documents"
      }
    ],
    "debugId": "6aa37aaf0b6d9b2fe8253073",
    "errors": [],
    "actions": [
      {
        "rel": "self",
        "action": "COPY",
        "title": "MODEL_PAYSLIP",
        "href": "https://api.ayoune.app/hr/payslips/6a730ab649e8c09f08a92b1c/copy",
        "method": "post",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      },
      {
        "rel": "self",
        "action": "DELETE",
        "title": "MODEL_PAYSLIP",
        "href": "https://api.ayoune.app/hr/payslips/6a730ab649e8c09f08a92b1c",
        "method": "delete",
        "types": [
          "application/json",
          "application/yaml",
          "text/csv"
        ]
      }
    ],
    "version": {
      "host": "2026.32.0",
      "core": "2026.335.0"
    },
    "rateLimit": {
      "limit": "2500",
      "remaining": "2298",
      "reset": "1789102207",
      "resetDate": "Fri Sep 11 2026"
    },
    "responseTime": 284.788284,
    "code": 200,
    "status": "success",
    "error": false
  }
}

Endpoints

MethodPathDescriptionRight
GET /payslips List with filters/pagination hr.payslips.view
GET /payslips/:id Single record by ID hr.payslips.view

SDK

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

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

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

See also