{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Offer",
  "description": "A job offer in our database",
  "type": "object",
  "properties": {
    "position": {
      "description": "Title of the job advert and of the offered position",
      "type": "string",
      "minLength": 5,
      "maxLength": 151
    },
    "refNr": {
      "description": "Reference number in partner´s system",
      "type": [
        "string",
        "null"
      ],
      "minLength": 2,
      "maxLength": 21
    },
    "jobTasks": {
      "description": "Description of responsibilities and job tasks",
      "type": [
        "string",
        "null"
      ],
      "minLength": 5
    },
    "prerequisites": {
      "description": "Prerequisites of an employee",
      "type": [
        "string",
        "null"
      ],
      "minLength": 5
    },
    "otherBenefits": {
      "description": "Benefits offered by the employer",
      "type": [
        "string",
        "null"
      ],
      "minLength": 5
    },
    "salary": {
      "description": "Additional salary information",
      "type": [
        "string",
        "null"
      ]
    },
    "startDate": {
      "description": "Employment date",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 200
    },
    "applicableTill": {
      "description": "Date of completion of the selection process",
      "type": "string",
      "format": "date"
    },
    "noteForCandidate": {
      "description": "Information for the job seeker",
      "type": [
        "string",
        "null"
      ],
      "minLength": 5
    },
    "channels": {
      "description": "Our job boards in 2 countries (ID from codebook)",
      "type": "array",
      "items": {
        "type": "integer",
        "enum": [
          1,
          3
        ]
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "languageFlag": {
      "description": "Language in which the advert is written",
      "type": "string",
      "enum": [
        "en",
        "de",
        "sk",
        "hu",
        "cz"
      ]
    },
    "categoryPositions": {
      "description": "Combination of working field and position - only 5 entries allowed (IDs from codebook)",
      "type": "array",
      "items": {
        "type": "array"
      },
      "minItems": 1,
      "maxItems": 5,
      "uniqueItems": true
    },
    "workplaceType": {
      "description": "Workplace type (ID from codebook)",
      "type": "integer"
    },
    "location": {
      "description": "Street",
      "type": [
        "string",
        "null"
      ],
      "minLength": 0,
      "maxLength": 100
    },
    "regions": {
      "description": "Place of work (ID from codebook)",
      "type": "array",
      "items": {
        "type": "integer"
      },
      "minItems": 1,
      "uniqueItems": true
    },
    "jobType": {
      "description": "Contract type (ID from codebook)",
      "type": "array",
      "minItems": 1,
      "uniqueItems": true
    },
    "educationLevels": {
      "description": "Required education level (ID from codebook)",
      "type": "array",
      "minItems": 1,
      "uniqueItems": true
    },
    "specialization": {
      "description": "Specialisation, field",
      "type": [
        "string",
        "null"
      ],
      "minLength": 2,
      "maxLength": 256
    },
    "validForGraduate": {
      "description": "Select whether the advert is suitable for a graduate (0=no, 1=yes)",
      "type": "integer",
      "enum": [
        0,
        1
      ]
    },
    "practiceYears": {
      "description": "Years of working experience",
      "type": "integer"
    },
    "skills": {
      "description": "Required skills and levels (ID from codebook)",
      "type": "object"
    },
    "languageConjunction": {
      "description": "Conjunction of language skills",
      "type": "string"
    },
    "drivingLicence": {
      "description": "Type of driving licence",
      "type": "string"
    },
    "numberOfOpenings": {
      "description": "The number of job openings - Number of employee for the job position in the specified locality.",
      "type": "integer"
    },
    "salaryInterval": {
      "description": "Salary interval",
      "type": "object",
      "properties": {
        "min": {
          "description": "Basic salary",
          "type": "number"
        },
        "max": {
          "description": "Upper limit",
          "type": "number"
        },
        "maxHidden": {
          "description": "Show or hide the upper limit of the salary",
          "type": "boolean"
        },
        "preriod": {
          "description": "Monthly or per hour (ID from codebook)",
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            }
          }
        },
        "currency": {
          "description": "Supported currencies: EUR, CZK and HUF (ID from codebook)",
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            }
          }
        }
      },
      "required": [
        "min",
        "max",
        "period"
      ]
    },
    "businessAreaId": {
      "description": "Client's core business",
      "type": "integer"
    },
    "shortCompanyCharacteristics": {
      "description": "Client's brief description",
      "type": [
        "string",
        "null"
      ],
      "minLength": 5
    },
    "contactData": {
      "description": "Contact persons ID in profesia's system",
      "type": "integer"
    },
    "firstName": {
      "description": "first name of the contact person",
      "type": "string",
      "minLength": 0,
      "maxLength": 50
    },
    "surname": {
      "description": "surname of the contact person",
      "type": "string",
      "minLength": 0,
      "maxLength": 50
    },
    "email": {
      "description": "email address of the contact person",
      "type": "string",
      "format": "email"
    },
    "applicationUrl": {
      "description": "URL address that includes a response form for a specific advert",
      "type": "string",
      "format": "uri",
      "pattern": "^(https?|http?)://",
      "maxLength": 512
    },
    "onlyNew": {
      "description": "You can receive the list of suitable CVs from our DB by e-mail",
      "type": "integer"
    },
    "applicationWithoutCv": {
      "description": "Create job ads which do not require a CV as an attachment when applying for a job.",
      "type": "boolean"
    },
    "postingPeriod": {
      "description": "Job posting period (1 WEEK, 2 WEEKS, 1 MONTH - ID from codebook)",
      "type": "integer"
    },
    "autoRepeatPost": {
      "description": "Repeating the same content multiple times",
      "type": "boolean"
    },
    "customFields": {
      "description": "If the standard text fields are not sufficient for a client, additional fields can be created upon request.",
      "type": "object"
    }
  },
  "required": [
    "position",
    "languageFlag",
    "channel",
    "jobTasks",
    "workplaceType",
    "regions",
    "categoryPositions",
    "jobType",
    "educationLevels",
    "contactData"
  ]
}