# Org chart

`GET https://api.fiscalisto.com/v1/payroll_org_chart`

Like «Nómina › Organigrama» in the app: the issuer's current employees with their direct manager, department and branch, how many people report to each one (directly and through their whole chain), the departments with their subdepartments, the vacancies and a summary (managers, average span, who is left without a manager or a department). Whoever has no manager, or whose manager already left, goes at the top; a loop left by an import is broken at the lowest number.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `issuer` | query |  | The issuer (iss_…). It can be left out if the key or the account has only one. |
| `as_of` | query |  | A past day (YYYY-MM-DD): the org chart as it was at the end of that day, with the managers, departments and sucursales it had then (kept since November 21, 2026). |

## With the TypeScript SDK

```ts
import { Fiscalisto } from "fiscalisto";

// La llave viene de FISCALISTO_API_KEY.
const fiscalisto = new Fiscalisto();

const payrollOrgChart = await fiscalisto.payrollOrgChart.get();
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

# La llave viene de FISCALISTO_API_KEY.
fiscalisto = Fiscalisto()

payroll_org_chart = fiscalisto.payroll_org_chart.get()
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
$fiscalisto = new Fiscalisto();

$payrollOrgChart = $fiscalisto->payrollOrgChart->get();
```

## With the .NET SDK

```csharp
using Fiscalisto;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollOrgChart = await fiscalisto.PayrollOrgChart.GetAsync();
```

## With the Go SDK

```go
package main

import (
	"context"
	"fmt"
	"log"

	fiscalisto "fiscalisto.com/go"
)

func main() {
	// La llave viene de FISCALISTO_API_KEY.
	client, err := fiscalisto.NewClient("")
	if err != nil {
		log.Fatal(err)
	}
	ctx := context.Background()

	payrollOrgChart, err := client.PayrollOrgChart.Get(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *payrollOrgChart)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;

// La llave viene de FISCALISTO_API_KEY.
var fiscalisto = new FiscalistoClient();

var payrollOrgChart = fiscalisto.payrollOrgChart().get();
System.out.println(payrollOrgChart);
```

## Response 200

OK.

A `PayrollOrgChart` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"payroll_org_chart"` | yes | What kind of object it is («invoice», «customer»…). |
| `livemode` | boolean | yes | true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT. |
| `issuer` | string | yes | The issuer (iss_…). |
| `as_of` | string | yes | The org chart's day (YYYY-MM-DD): it shows who works that day. |
| `summary` | object | yes | The org chart's counts and what is worth reviewing. |
| `summary.employees` | integer | yes | Today's employees. (from -9007199254740991 to 9007199254740991) |
| `summary.managers` | integer | yes | How many have at least one direct report. (from -9007199254740991 to 9007199254740991) |
| `summary.average_span` | number | yes | Direct reports per manager, on average (one decimal). |
| `summary.departments` | integer | yes | Departments, including those only on receipts. (from -9007199254740991 to 9007199254740991) |
| `summary.branches` | integer | yes | How many branches (counting the main office) have people. (from -9007199254740991 to 9007199254740991) |
| `summary.vacancies` | integer | yes | Positions without a person. (from -9007199254740991 to 9007199254740991) |
| `summary.without_manager` | array of string | yes | Those at the top who aren't the head (everyone at the top except the one with the largest team). |
| `summary.wide_span` | array of string | yes | Managers with more than 10 direct reports. |
| `summary.without_department` | array of string | yes | No department: their receipts don't carry one. |
| `top` | array of string | yes | The employees at the very top (no manager), the one with the largest team first. |
| `employees` | array of object | yes | Today's employees, each with their manager and their team. |
| `employees[].employee` | string | yes | The employee (emp_…). |
| `employees[].number` | string | yes | Their employee number. |
| `employees[].name` | string | yes | Name. |
| `employees[].position` | string or null | yes | Their position. |
| `employees[].department` | string or null | yes | Department (Departamento). |
| `employees[].branch` | string or null | yes | Their branch (brn_…); null is the main office. |
| `employees[].manager` | string or null | yes | Their direct manager (emp_…); null if they are at the top. |
| `employees[].direct_reports` | integer | yes | Their direct reports. (from -9007199254740991 to 9007199254740991) |
| `employees[].total_reports` | integer | yes | Everyone who reports to them, along their whole chain. (from -9007199254740991 to 9007199254740991) |
| `departments` | array of object | yes | The departments, each after the one above it. |
| `departments[].name` | string | yes | Name. |
| `departments[].parent` | string or null | yes | The department it is inside. |
| `departments[].lead` | string or null | yes | Its head (emp_…). |
| `departments[].employees` | integer | yes | People in it. (from -9007199254740991 to 9007199254740991) |
| `departments[].total_employees` | integer | yes | People in it and in its subdepartments. (from -9007199254740991 to 9007199254740991) |
| `departments[].depth` | integer | yes | 0 at the top, 1 inside one, and so on. (from -9007199254740991 to 9007199254740991) |
| `vacancies` | array of object | yes | The positions without a person yet. |
| `vacancies[].id` | string | yes | The vacancy (vac_…). |
| `vacancies[].title` | string | yes | The position. |
| `vacancies[].department` | string or null | yes | Department (Departamento). |
| `vacancies[].manager` | string or null | yes | Under which manager (emp_…). |
| `vacancies[].branch` | string or null | yes | Branch (brn_…) the invoice is issued from: its postal code goes in LugarExpedicion, its address on the PDF and, if it has them, its series. Without it, the issuer's tax address (the Matriz). |
| `vacancies[].opened_on` | string | yes | Since when it has been open (YYYY-MM-DD). |
| `vacancies[].status` | `pending_approval`, `approved`, `rejected`, `filled` | yes | pending_approval awaits the go-ahead of someone with the «Aprobar la prenómina» permission (those opened by an API key, and those opened or changed by someone without it); approved can now be filled. Only these two show in the org chart. |
| `vacancies[].salary_min` | number or null | yes | Gross monthly salary offered, from. |
| `vacancies[].salary_max` | number or null | yes | Gross monthly salary offered, up to. |
| `vacancies[].state` | string or null | yes | State where the person will work (c_Estado), if stated. |
| `vacancies[].monthly_cost` | object | yes | What it would cost the empresa per month: the salary, the employer contributions (first year, statutory benefits, the issuer's risk premium) and its state's payroll tax. null without a salary. |
| `vacancies[].monthly_cost.min` | object or null | yes | With salary_min. |
| `vacancies[].monthly_cost.min.salary` | number | yes | The monthly salary. |
| `vacancies[].monthly_cost.min.employer_contributions` | number | yes | What the employer pays IMSS, SAR and Infonavit per month (employer-employee contributions). |
| `vacancies[].monthly_cost.min.payroll_tax` | number | yes | The state's payroll tax per month. |
| `vacancies[].monthly_cost.min.total` | number | yes | What it costs the empresa per month. |
| `vacancies[].monthly_cost.max` | object or null | yes | With salary_max. |
| `vacancies[].monthly_cost.max.salary` | number | yes | The monthly salary. |
| `vacancies[].monthly_cost.max.employer_contributions` | number | yes | What the employer pays IMSS, SAR and Infonavit per month (employer-employee contributions). |
| `vacancies[].monthly_cost.max.payroll_tax` | number | yes | The state's payroll tax per month. |
| `vacancies[].monthly_cost.max.total` | number | yes | What it costs the empresa per month. |

```json
{
  "object": "payroll_org_chart",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "as_of": "2026-11-20",
  "summary": {
    "employees": 3,
    "managers": 2,
    "average_span": 1,
    "departments": 2,
    "branches": 1,
    "vacancies": 1,
    "without_manager": [],
    "wide_span": [],
    "without_department": []
  },
  "top": [
    "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV"
  ],
  "employees": [
    {
      "employee": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "number": "1",
      "name": "MARIANA ROBLES GARZA",
      "position": "Directora general",
      "department": "Dirección",
      "branch": null,
      "manager": null,
      "direct_reports": 1,
      "total_reports": 2
    },
    {
      "employee": "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
      "number": "2",
      "name": "JORGE TREVIÑO SALAS",
      "position": "Gerente de operaciones",
      "department": "Operaciones",
      "branch": null,
      "manager": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "direct_reports": 1,
      "total_reports": 1
    },
    {
      "employee": "emp_OufpKqnrvx9p1aZ8hR4mKtWq2YbNcVxLpe",
      "number": "3",
      "name": "LUCÍA HERRERA PAZ",
      "position": "Supervisora",
      "department": "Operaciones",
      "branch": null,
      "manager": "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
      "direct_reports": 0,
      "total_reports": 0
    }
  ],
  "departments": [
    {
      "name": "Dirección",
      "parent": null,
      "lead": "emp_OufpKqnrvx9p3RxmD1RIDgEHzKYPYnYBlV",
      "employees": 1,
      "total_employees": 3,
      "depth": 0
    },
    {
      "name": "Operaciones",
      "parent": "Dirección",
      "lead": "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
      "employees": 2,
      "total_employees": 2,
      "depth": 1
    }
  ],
  "vacancies": [
    {
      "id": "vac_OufpKqnrvx9p6QwErTyUiOpAsDfGhJkLzX",
      "title": "Analista de operaciones",
      "department": "Operaciones",
      "manager": "emp_OufpKqnrvx9p5TkcW2pQhJYvLsNmA8eFxB",
      "branch": null,
      "opened_on": "2026-11-03",
      "status": "approved",
      "salary_min": 16000,
      "salary_max": 20000,
      "state": "NLE",
      "monthly_cost": {
        "min": {
          "salary": 16000,
          "employer_contributions": 4069.82,
          "payroll_tax": 480,
          "total": 20549.82
        },
        "max": {
          "salary": 20000,
          "employer_contributions": 4936.77,
          "payroll_tax": 600,
          "total": 25536.77
        }
      }
    }
  ]
}
```

## Errors

- `feature_not_in_plan` (403): Live, this part of the API (inventario, portal de proveedores, pedidos, comprobación de gastos) follows the empresa's plan, as in the app: it comes with Operaciones (added to any paid plan; included in Corporativo). The books (the /v1/accounting routes except DIOT, cross checks, IVA refunds and fixed assets) come with Contabilidad (added to Independiente, Emprendedor or Negocio; included in Despacho and Corporativo): without it, changing the books answers this error, and reading them works only up to the last month it had it. Add either in Ajustes › Plan y pagos; test mode has everything.
- `issuer_archived` (400): The issuer is archived and no longer stamps. Its documents can still be read and canceled.
- `issuer_linked_empresa` (403): That issuer is an empresa of the app connected to your account: through the API it only offers its Portal de proveedores (/v1/portal_suppliers and /v1/supplier_invoices) and, once someone who may pay suppliers and change Configurar pagos turned them on, its supplier payouts (/v1/payouts and /v1/payroll_payouts). It also stops when whoever connected it (or turned its payouts on) no longer has that permission in the empresa: message_es says which. Do everything else in the app.
- `issuer_missing` (404): There is no such issuer in the account (or it belongs to the other mode).
- `issuer_not_allowed` (403): This key can't use that issuer.
- `issuer_required` (400): The account has several issuers and the request doesn't say which: send `issuer` (iss_…).
- `livemode_mismatch` (400): The object belongs to the other mode: an fk_test_ key only sees test data and an fk_live_ key only live data.

Plus those of any call (key, fields, limits): https://fiscalisto.com/en/docs/api/errores.md.
