# Publish a vacancy

`POST https://api.fiscalisto.com/v1/payroll_org_chart/vacancies/{id}/publish`

Puts it on the issuer's careers page (published true) or takes it off (false), with its description, requirements, contract type, workplace, visible salary, closing date and the form (jbf_…) applicants fill in. Only an approved vacancy can be published; publishing it turns the page on if it was off. Google can show it in its job search results (JobPosting). Returns hiring.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | The object's id. |
| `Idempotency-Key` | header |  | Optional (the SDKs send it on their own). If the response is lost, repeat the request with the same value within 24 hours: it answers the same, with idempotent-replayed: true, and doesn't do it twice (it doesn't create, send emails or charge). |

## Body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `published` | boolean | yes | true puts it on the page; false takes it off. |
| `description` | string or null |  | What the person will do; paragraphs are separated by a blank line. |
| `requirements` | array of string |  | What it asks for, one per line (education, experience…). (up to 30) |
| `employment_type` | `full_time`, `part_time`, `fixed_term`, `project`, `internship` or null |  | full_time, part_time, fixed_term (for a fixed term), project (for a specific project) or internship. |
| `workplace` | `on_site`, `hybrid`, `remote` or null |  | Where the work happens: on_site, hybrid or remote. |
| `show_salary` | boolean |  | Whether the page shows the vacancy's salary (salary_min and salary_max). |
| `closes_on` | string or null |  | Last day it takes applications (YYYY-MM-DD). |
| `form` | string or null |  | The form applicants fill in (jbf_…); null for the default. |

Example:

```json
{
  "published": true,
  "description": "Coordinará las entregas de la zona norte.",
  "requirements": [
    "Licenciatura en logística o afín"
  ],
  "employment_type": "full_time",
  "workplace": "on_site",
  "show_salary": true,
  "closes_on": "2026-12-15"
}
```

## With the TypeScript SDK

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

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

const hiring = await fiscalisto.payrollOrgChart.publishVacancy("id", {
  published: true,
  description: "Coordinará las entregas de la zona norte.",
  requirements: ["Licenciatura en logística o afín"],
  employment_type: "full_time",
  workplace: "on_site",
  show_salary: true,
  closes_on: "2026-12-15",
}, { idempotencyKey: "pedido-A-1042" });
```

## With the Python SDK

```python
from fiscalisto import Fiscalisto

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

hiring = fiscalisto.payroll_org_chart.publish_vacancy("id", {
    "published": True,
    "description": "Coordinará las entregas de la zona norte.",
    "requirements": ["Licenciatura en logística o afín"],
    "employment_type": "full_time",
    "workplace": "on_site",
    "show_salary": True,
    "closes_on": "2026-12-15",
}, idempotency_key="pedido-A-1042")
```

## With the PHP SDK

```php
<?php

use Fiscalisto\Fiscalisto;

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

$hiring = $fiscalisto->payrollOrgChart->publishVacancy('id', [
    'published' => true,
    'description' => 'Coordinará las entregas de la zona norte.',
    'requirements' => ['Licenciatura en logística o afín'],
    'employment_type' => 'full_time',
    'workplace' => 'on_site',
    'show_salary' => true,
    'closes_on' => '2026-12-15',
], ['idempotency_key' => 'pedido-A-1042']);
```

## With the .NET SDK

```csharp
using Fiscalisto;

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

var hiring = await fiscalisto.PayrollOrgChart.PublishVacancyAsync("id", new PublishPayrollVacancyParams
{
    Published = true,
    Description = "Coordinará las entregas de la zona norte.",
    Requirements = new() { "Licenciatura en logística o afín" },
    EmploymentType = "full_time",
    Workplace = "on_site",
    ShowSalary = true,
    ClosesOn = "2026-12-15",
}, new RequestOptions { IdempotencyKey = "pedido-A-1042" });
```

## 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()

	hiring, err := client.PayrollOrgChart.PublishVacancy(ctx, "id", &fiscalisto.PublishPayrollVacancyParams{
		Published:      true,
		Description:    fiscalisto.String("Coordinará las entregas de la zona norte."),
		Requirements:   []string{"Licenciatura en logística o afín"},
		EmploymentType: fiscalisto.String("full_time"),
		Workplace:      fiscalisto.String("on_site"),
		ShowSalary:     fiscalisto.Bool(true),
		ClosesOn:       fiscalisto.String("2026-12-15"),
	}, fiscalisto.WithIdempotencyKey("pedido-A-1042"))
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", *hiring)
}
```

## With the Java SDK

```java
import com.fiscalisto.FiscalistoClient;
import com.fiscalisto.RequestOptions;
import com.fiscalisto.model.PublishPayrollVacancyParams;
import java.util.List;

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

var hiring = fiscalisto.payrollOrgChart().publishVacancy("id", new PublishPayrollVacancyParams()
        .setPublished(true)
        .setDescription("Coordinará las entregas de la zona norte.")
        .setRequirements(List.of("Licenciatura en logística o afín"))
        .setEmploymentType("full_time")
        .setWorkplace("on_site")
        .setShowSalary(true)
        .setClosesOn("2026-12-15"), RequestOptions.idempotencyKey("pedido-A-1042"));
System.out.println(hiring);
```

## Response 200

OK.

A `Hiring` object:

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `object` | `"hiring"` | 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_…). |
| `careers_url` | string | yes | The issuer's careers page. |
| `enabled` | boolean | yes | Whether the page is visible. |
| `intro` | string or null | yes | The text at the top of the page. |
| `contact_email` | string or null | yes | The email for candidates' questions and ARCO rights; null uses the Datos fiscales one. |
| `stages` | array of string | yes | The candidate stages, in order. |
| `unmet_requirements` | `flag`, `warn` | yes | Someone who doesn't meet a requirement: flag, their application arrives flagged; warn, they are also told before sending. |
| `default_form` | string or null | yes | The form (jbf_…) for vacancies that don't choose one; null for the basic one. |
| `forms` | array of object | yes | Its application forms. |
| `forms[].id` | string | yes | The form (jbf_…). |
| `forms[].object` | `"job_form"` | yes | What kind of object it is («invoice», «customer»…). |
| `forms[].name` | string | yes | Name. |
| `forms[].questions` | array of object | yes | Its questions, in order. |
| `forms[].questions[].id` | string | yes | Its key: answers are keyed by it. |
| `forms[].questions[].label` | string | yes | The question, as the applicant reads it. |
| `forms[].questions[].help` | string or null | yes | The help text under the field. |
| `forms[].questions[].type` | `text`, `longtext`, `number`, `date`, `select`, `multiselect`, `yesno`, `email`, `phone`, `url`, `file` | yes | Receipt type (TipoDeComprobante): I income, E expense, P payment, T transfer, N payroll. |
| `forms[].questions[].required` | boolean | yes | Whether it can't be left blank. |
| `forms[].questions[].options` | array of string | yes | Those of select and multiselect. |
| `forms[].questions[].files` | array of `pdf`, `image`, `doc` | yes | The files a file question accepts. |
| `forms[].questions[].rules` | object or null | yes | What is checked in the answer (min_length, max, dates…). |
| `forms[].questions[].requirement` | object or null | yes | If it is a requirement, the answers or the minimum that meet it. |
| `forms[].questions[].requirement.answers` | array of string | yes | The answers that meet it. |
| `forms[].questions[].requirement.min` | number or null | yes | In a number, the minimum that meets it. |
| `vacancies` | array of object | yes | Open vacancies, and filled ones that still have candidates. |
| `vacancies[].id` | string | yes | The vacancy (vac_…). |
| `vacancies[].title` | string | yes | The position. |
| `vacancies[].department` | string or null | yes | Department (Departamento). |
| `vacancies[].status` | `pending_approval`, `approved`, `rejected`, `filled` | yes | Object status. |
| `vacancies[].published` | boolean | yes | Whether it is on the careers page. |
| `vacancies[].url` | string or null | yes | Its page, if published. |
| `vacancies[].description` | string or null | yes | Description. |
| `vacancies[].requirements` | array of string | yes | What it asks for. |
| `vacancies[].employment_type` | `full_time`, `part_time`, `fixed_term`, `project`, `internship` or null | yes | The contract type. |
| `vacancies[].workplace` | `on_site`, `hybrid`, `remote` or null | yes | Where the work happens. |
| `vacancies[].show_salary` | boolean | yes | Whether the page shows the salary. |
| `vacancies[].closes_on` | string or null | yes | Last day it takes applications (YYYY-MM-DD). |
| `vacancies[].form` | string or null | yes | Pharmaceutical form (FormaFarmaceutica), c_FormaFarmaceutica. |
| `vacancies[].candidates` | array of object | yes | How many candidates are in each stage. |
| `vacancies[].candidates[].stage` | string | yes | The stage. |
| `vacancies[].candidates[].count` | integer | yes | How many are in it. (from -9007199254740991 to 9007199254740991) |

```json
{
  "object": "hiring",
  "livemode": false,
  "issuer": "iss_OufpKqnrvx9p",
  "careers_url": "https://fiscalisto.com/empleos/org_5f1c2b7a?rfc=EKU9003173C9",
  "enabled": true,
  "intro": "Somos una distribuidora en Monterrey con 40 personas.",
  "contact_email": "empleos@ejemplo.mx",
  "stages": [
    "Nuevas",
    "En revisión",
    "Entrevista",
    "Oferta",
    "Contratada",
    "Descartada"
  ],
  "unmet_requirements": "flag",
  "default_form": "jbf_OufpKqnrvx9p8NbVcXzLkJhGfDsAqWeRtY",
  "forms": [
    {
      "id": "jbf_OufpKqnrvx9p8NbVcXzLkJhGfDsAqWeRtY",
      "object": "job_form",
      "name": "Operaciones",
      "questions": [
        {
          "id": "nombre",
          "label": "Nombre completo",
          "help": null,
          "type": "text",
          "required": true,
          "options": [],
          "files": [],
          "rules": null,
          "requirement": null
        },
        {
          "id": "correo",
          "label": "Correo",
          "help": null,
          "type": "email",
          "required": true,
          "options": [],
          "files": [],
          "rules": null,
          "requirement": null
        },
        {
          "id": "telefono",
          "label": "Teléfono",
          "help": null,
          "type": "phone",
          "required": true,
          "options": [],
          "files": [],
          "rules": null,
          "requirement": null
        },
        {
          "id": "cv",
          "label": "Currículum (CV)",
          "help": null,
          "type": "file",
          "required": true,
          "options": [],
          "files": [
            "pdf",
            "doc"
          ],
          "rules": null,
          "requirement": null
        },
        {
          "id": "anos_de_experiencia",
          "label": "Años de experiencia en logística",
          "help": null,
          "type": "number",
          "required": true,
          "options": [],
          "files": [],
          "rules": {
            "min": 0,
            "max": 50,
            "integer": true
          },
          "requirement": {
            "answers": [],
            "min": 2
          }
        },
        {
          "id": "licencia",
          "label": "¿Tiene licencia de manejo vigente?",
          "help": null,
          "type": "yesno",
          "required": true,
          "options": [],
          "files": [],
          "rules": null,
          "requirement": {
            "answers": [
              "si"
            ],
            "min": null
          }
        }
      ]
    }
  ],
  "vacancies": [
    {
      "id": "vac_OufpKqnrvx9p6QwErTyUiOpAsDfGhJkLzX",
      "title": "Analista de operaciones",
      "department": "Operaciones",
      "status": "approved",
      "published": true,
      "url": "https://fiscalisto.com/empleos/org_5f1c2b7a/2b7c0a4e-8d1f-4c3a-9e2b-6f5d4c3b2a19",
      "description": "Coordinará las entregas de la zona norte.",
      "requirements": [
        "Licenciatura en logística o afín"
      ],
      "employment_type": "full_time",
      "workplace": "on_site",
      "show_salary": true,
      "closes_on": "2026-12-15",
      "form": null,
      "candidates": [
        {
          "stage": "Nuevas",
          "count": 3
        },
        {
          "stage": "Entrevista",
          "count": 1
        }
      ]
    }
  ]
}
```

## 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.
- `resource_missing` (404): There's no object with that id (or it belongs to another issuer or the other mode).

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