Entity Relationships
Understanding how Paismo's data models connect is key to building efficient integrations.
Performance Tip: The Nexus API uses embedded IDs. When you fetch a child resource (like a Payroll Transaction), it includes the IDs of its parents (Employee, Payroll Run) so you don't always need to fetch the full parent object.
1. Organization Structure
Employees are the central entity. They belong to a Department and a Work Location.
When fetching an employee, you will receive `department_id` and `work_location_id`. These are stable UUIDs.
2. Payroll Architecture
Payroll data is hierarchical. To get to the money (Transactions), you must understand the flow from Period -> Run -> Transaction.
- Payroll Period: Defines the time range (e.g., Jan 1 - Jan 15).
- Payroll Run: An execution of payroll for that period (can be Draft or Approved).
- Transaction: A single line item (e.g., $5000 Salary) linked to an Employee and a Concept.