{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gupy/json-schema/gupy-job-schema.json",
  "title": "job",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gupy-public-api-openapi.yml#/components/schemas/job",
  "type": "object",
  "properties": {
    "id": {
      "description": "Job ID",
      "type": "integer",
      "format": "int64"
    },
    "code": {
      "description": "Job posting code (eg. 999-99999)",
      "type": "string",
      "maxLength": 255
    },
    "name": {
      "description": "Job name (eg. Programador Node.js)",
      "type": "string",
      "maxLength": 255
    },
    "status": {
      "description": "Job status",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "draft",
        "waiting_approval",
        "approved",
        "disapproved",
        "published",
        "frozen",
        "closed",
        "canceled"
      ]
    },
    "type": {
      "description": "Job type",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "vacancy_type_apprentice",
        "vacancy_type_associate",
        "vacancy_type_talent_pool",
        "vacancy_type_effective",
        "vacancy_type_internship",
        "vacancy_type_summer",
        "vacancy_type_temporary",
        "vacancy_type_outsource",
        "vacancy_type_trainee",
        "vacancy_type_volunteer",
        "vacancy_legal_entity",
        "vacancy_type_lecturer",
        "vacancy_type_freelancer",
        "vacancy_type_autonomous",
        "vacancy_type_intermittent"
      ]
    },
    "publicationType": {
      "description": "Publication type (eg. external, internal)",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "external",
        "internal"
      ]
    },
    "numVacancies": {
      "description": "Number of total vacancies (eg. 10)",
      "type": "integer",
      "format": "int64"
    },
    "departmentId": {
      "description": "Department ID",
      "type": "integer",
      "format": "int64"
    },
    "departmentName": {
      "description": "Department name (eg. Recursos Humanos, Logística)",
      "type": "string",
      "maxLength": 255
    },
    "roleId": {
      "description": "Role ID",
      "type": "integer",
      "format": "int64"
    },
    "roleName": {
      "description": "Role name (eg. Desenvolvedor, Estagiário)",
      "type": "string",
      "maxLength": 255
    },
    "branchId": {
      "description": "Branch ID",
      "type": "integer",
      "format": "int64"
    },
    "branchName": {
      "description": "Branch name",
      "type": "string",
      "maxLength": 255
    },
    "description": {
      "description": "Job description",
      "type": "string",
      "maxLength": 1073741824
    },
    "responsibilities": {
      "description": "Main responsabilities and attribuitions",
      "type": "string",
      "maxLength": 1073741824
    },
    "prerequisites": {
      "description": "Requirements and skills",
      "type": "string",
      "maxLength": 1073741824
    },
    "additionalInformation": {
      "description": "Additional relevant informations",
      "type": "string",
      "maxLength": 1073741824
    },
    "notes": {
      "description": "Internal notes about the job",
      "type": "string",
      "maxLength": 1073741824
    },
    "disabilities": {
      "description": "Available for person with disabilities",
      "type": "boolean"
    },
    "addressCountry": {
      "description": "Job address country",
      "type": "string",
      "maxLength": 255
    },
    "addressCountryShortName": {
      "description": "Job address short country name",
      "type": "string",
      "maxLength": 255
    },
    "addressState": {
      "description": "Job address state",
      "type": "string",
      "maxLength": 255
    },
    "addressStateShortName": {
      "description": "Job address short state name",
      "type": "string",
      "maxLength": 255
    },
    "addressCity": {
      "description": "Job address city",
      "type": "string",
      "maxLength": 255
    },
    "addressStreet": {
      "description": "Job address street",
      "type": "string",
      "maxLength": 255
    },
    "addressDistrict": {
      "description": "Job address district",
      "type": "string",
      "maxLength": 255
    },
    "addressComplements": {
      "description": "Job address complements",
      "type": "string",
      "maxLength": 255
    },
    "addressNumber": {
      "description": "Job address number",
      "type": "string",
      "maxLength": 255
    },
    "addressZipCode": {
      "description": "Job address zip code",
      "type": "string",
      "maxLength": 255
    },
    "addressLatitude": {
      "description": "Work location latitude.",
      "type": "number",
      "format": "double"
    },
    "addressLongitude": {
      "description": "Work location longitude.",
      "type": "number",
      "format": "double"
    },
    "remoteWorking": {
      "deprecated": true,
      "description": "This job is for remote working. This field will soon be deprecated, please use workplaceType instead for setting remoteWorking accurately.",
      "type": "boolean"
    },
    "workplaceType": {
      "description": "Workplace type. If provided, will be used to set the remoteWorking correctly.",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "hybrid",
        "on-site",
        "remote"
      ]
    },
    "reason": {
      "description": "Job opening reason",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "staff_increase",
        "staff_replacement"
      ]
    },
    "image": {
      "description": "Image url for job website",
      "type": "string",
      "maxLength": 255
    },
    "socialMediaImage": {
      "description": "Image url for social media",
      "type": "string",
      "maxLength": 255
    },
    "applicationDeadline": {
      "description": "Final date for application",
      "type": "string",
      "format": "date"
    },
    "careerPageId": {
      "description": "Career page ID",
      "type": "integer",
      "format": "int64"
    },
    "careerPageName": {
      "description": "Career page name",
      "type": "string",
      "maxLength": 128
    },
    "vacancyCodes": {
      "description": "Vacancy codes associated to job",
      "type": "array",
      "items": {
        "description": "Vacancy code data",
        "type": "object",
        "properties": {
          "id": {
            "description": "Vacancy Code id",
            "type": "integer",
            "format": "int64"
          },
          "code": {
            "description": "Vacancy Code",
            "type": "string",
            "maxLength": 255
          },
          "status": {
            "description": "Vacancy status",
            "type": "string",
            "maxLength": 32,
            "enum": [
              "valid",
              "invalid",
              "error",
              "waiting"
            ]
          },
          "errorMessage": {
            "description": "Error message when status=error (eg. Gestor inválido)",
            "type": "string",
            "maxLength": 255
          }
        }
      }
    },
    "managerId": {
      "description": "User ID of the job manager",
      "type": "integer",
      "format": "int64"
    },
    "managerName": {
      "description": "Name of the job manager",
      "type": "string",
      "maxLength": 255
    },
    "managerEmail": {
      "description": "E-mail of the job manager",
      "type": "string",
      "maxLength": 255,
      "format": "email"
    },
    "recruiterId": {
      "description": "User ID of the job recruiter",
      "type": "integer",
      "format": "int64"
    },
    "recruiterName": {
      "description": "Name of the job recruiter",
      "type": "string",
      "maxLength": 255
    },
    "recruiterEmail": {
      "description": "E-mail of the job recruiter",
      "type": "string",
      "maxLength": 255,
      "format": "email"
    },
    "hiringDeadline": {
      "description": "Deadline for hiring candidates",
      "type": "string",
      "format": "date"
    },
    "salary": {
      "description": "Salary data",
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "maxLength": 3,
          "description": "Salary currency type (eg. R$)"
        },
        "startsAt": {
          "type": "number",
          "format": "double",
          "description": "Salary min value"
        },
        "endsAt": {
          "type": "number",
          "format": "double",
          "description": "Salary max value"
        }
      }
    },
    "customFields": {
      "description": "Custom fields defined for this job",
      "type": "array",
      "items": {
        "$ref": "#/$defs/jobCustomField"
      }
    },
    "jobRatingCriterias": {
      "description": "Rating criterias that belongs to the job",
      "type": "array",
      "items": {
        "$ref": "#/$defs/jobRatingCriteria"
      }
    },
    "cancelReason": {
      "description": "Job cancel reason",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "staff_increase_or_substitution_postponed",
        "cancellation_requested_by_manager",
        "internal_transfer",
        "organizational_restructuring",
        "budget_review",
        "other"
      ]
    },
    "cancelReasonNotes": {
      "description": "Job cancel reason notes provided by user when cancelReason is other",
      "type": "string",
      "maxLength": 255
    },
    "canceledByEmail": {
      "description": "E-mail of the person who canceled the job",
      "type": "string",
      "maxLength": 255,
      "format": "email"
    },
    "cancelAt": {
      "description": "Date of job cancel",
      "type": "string",
      "format": "date-time"
    },
    "createdAt": {
      "description": "Date of creation",
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "description": "Date of update",
      "type": "string",
      "format": "date-time"
    },
    "publishedAt": {
      "description": "Date of job publication",
      "type": "string",
      "format": "date-time"
    },
    "approvedAt": {
      "description": "Date of job approve",
      "type": "string",
      "format": "date-time"
    },
    "disapprovedAt": {
      "description": "Date of job disapprove",
      "type": "string",
      "format": "date-time"
    },
    "closedAt": {
      "description": "Date of job close",
      "type": "string",
      "format": "date-time"
    },
    "lastFreezeDate": {
      "description": "Last date of job freeze",
      "type": "string",
      "format": "date-time"
    },
    "lastUnFreezeDate": {
      "description": "Last date of job unfreeze",
      "type": "string",
      "format": "date-time"
    },
    "creatorId": {
      "description": "User ID of the job creator",
      "type": "integer",
      "format": "int64"
    },
    "creatorName": {
      "description": "Name of the job creator",
      "type": "string",
      "maxLength": 255
    },
    "creatorEmail": {
      "description": "E-mail of the job creator",
      "type": "string",
      "maxLength": 255,
      "format": "email"
    },
    "videoUrl": {
      "description": "A video url about the job.",
      "type": "string",
      "maxLength": 255
    },
    "approvers": {
      "description": "User ids to be approvers of the job",
      "type": "array",
      "items": {
        "description": "User ids",
        "type": "number"
      }
    },
    "workflowRequestMethod": {
      "description": "Workflow request method",
      "type": "string",
      "maxLength": 255,
      "enum": [
        "all_at_once",
        "in_order"
      ]
    }
  },
  "$defs": {
    "jobCustomField": {
      "description": "Custom field data",
      "type": "object",
      "properties": {
        "id": {
          "description": "Custom field id",
          "type": "string",
          "maxLength": 32
        },
        "label": {
          "description": "Custom field label",
          "type": "string",
          "maxLength": 32
        },
        "value": {
          "description": "Custom field provided value",
          "anyOf": [
            {
              "type": "string",
              "maxLength": 255
            },
            {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 255
              }
            }
          ]
        },
        "type": {
          "description": "Custom field type",
          "type": "string",
          "maxLength": 32,
          "enum": [
            "select",
            "multiSelect",
            "text",
            "boolean",
            "number",
            "date",
            "time"
          ]
        },
        "order": {
          "description": "Custom field order of appearance when editing a job",
          "type": "integer",
          "format": "int64"
        },
        "required": {
          "description": "Informs if this custom field response is mandatory",
          "type": "boolean"
        },
        "enum": {
          "description": "Possible options to be provided as value",
          "type": "array",
          "items": {
            "description": "Value",
            "type": "string"
          }
        }
      }
    },
    "jobRatingCriteria": {
      "description": "Rating criterias for the job",
      "type": "object",
      "properties": {
        "jobId": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string",
          "maxLength": 255
        }
      }
    }
  }
}