openapi: 3.0.3
info:
  title: ATS API V4 Specification
  description: |-
    This is the API specification for ATS systems to integrate with ATSi Apply.
    
    # What's New in Version 4
    
    - Added support for basic fields. It is now possible to specify which basic data fields should be presented on the application form, along with validations for them:
      - First name
      - Surname
      - Email
      - Mobile phone number
      - Gender
      - CV
      - Cover letter
      - Additional documents

    # Application flow
    
    The application submission process starts when a job seeker (candidate) begins exploring job listings on a Job board. Upon selecting a specific job, the Job board verifies if the position is currently available and prepares the application form for the candidate. To do this, the Job board sends an inquiry request to ATSi to get the job status and a list of basic fields (like first name, last name, email, etc.), screening questions, and consents that need to be presented to the candidate during the application process. If the job is integrated and its status is Active, ATSi supplies all required information to the Job board. The candidate proceeds to fill in the application form, upload their resume and any additional documents, respond to screening questions, and then submits their application. The Job board forwards the submitted application data to ATSi, which then relays it to the ATS. Upon successful processing of the application by the ATS, a confirmation is sent back to ATSi and then communicated to the job seeker through the Job board.
    
    ![Full integration flow](https://developer.atsi-apply.com/wp-content/uploads/2020/08/ATSi_flow-1.png)
    
    To build an integration with ATSi Apply the ATS have to implement the REST API that includes two endpoints: `/inquiry` and `/apply`. These endpoints are illustrated in the previously mentioned diagram as Job Details Service and Apply Service, respectively.
    
    # Inquiry
    The `/inquiry` endpoint is designed to provide information on the specified job offer, including the current job status (options include ACTIVE, INACTIVE, or EXPIRED), alongside a list of basic fields (like first name, last name, email, etc.), screening questions, and consents that must be shown to the candidate during the application process.

    ## Basic data questions
    --------------------------
    The `/inquiry` endpoint is designed to return, among other things, a list of basic data questions that need to be included on the job application form. These basic data questions are fields on the application form that gather information about the candidate, which is typically required across various job application processes. Examples include personal data (such as first name, last name), contact data (e.g., email, mobile phone number), and documents like a resume or cover letter. ATSi Apply supports a predetermined list of these basic fields and validations (see [Validation rules compatibility](#validation-rules-compatibility)). The section for basic data fields is expected to follow this format:
    ```
    {
      "BasicData": [
        {
          "Name": "FirstName",
          "Visibility": "MANDATORY",
          "Validations": [
            {
              "Id": "INPUT_TEXT_MIN_MAX_LENGTH",
              "Parameters": {
                "MinLength": 1,
                "MaxLength": 128
              }
            }
          ]
        },
        {
          "Name": "Surname",
          "Visibility": "MANDATORY",
          "Validations": [
            {
              "Id": "INPUT_TEXT_MIN_MAX_LENGTH",
              "Parameters": {
                "MinLength": 1,
                "MaxLength": 128
              }
            }
          ]
        },
        {
          "Name": "Email",
          "Visibility": "MANDATORY"
        },
        {
          "Name": "Mobile",
          "Visibility": "OPTIONAL"
          "Validations": [
            {
              "Id": "INPUT_TEXT_MIN_MAX_LENGTH",
              "Parameters": {
                "MinLength": 0,
                "MaxLength": 128
              }
            }
          ]
        },
        {
          "Name": "Gender",
          "Visibility": "UNSUPPORTED"
        },
        {
          "Name": "CV",
          "Visibility": "MANDATORY"
          "Validations": [
            {
              "Id": "FILE_MAX_SIZE",
              "Parameters": {
                "MaxSize": 2097152
              }
            },
            {
              "Id": "FILE_ACCEPTED_TYPES",
              "Parameters": {
                "AcceptedTypes": [
                  "doc",
                  "docx",
                  "jpeg",
                  "jpg",
                  "pdf",
                  "png",
                  "rtf",
                  "txt"
                ]
              }
            }
          ]
        },
        {
          "Name": "CoverLetter",
          "Visibility": "OPTIONAL"
          "Validations": [
            {
              "Id": "FILE_MAX_SIZE",
              "Parameters": {
                "MaxSize": 2097152
              }
            },
            {
              "Id": "FILE_ACCEPTED_TYPES",
              "Parameters": {
                "AcceptedTypes": [
                  "doc",
                  "docx",
                  "pdf",
                  "txt"
                ]
              }
            }
          ]
        },
        {
          "Name": "AdditionalDocuments",
          "Visibility": "OPTIONAL"
          "Validations": [
            {
              "Id": "FILE_MAX_SIZE",
              "Parameters": {
                "MaxSize": 2097152
              }
            },
            {
              "Id": "FILE_ACCEPTED_TYPES",
              "Parameters": {
                "AcceptedTypes": [
                  "doc",
                  "docx",
                  "jpeg",
                  "jpg",
                  "pdf",
                  "png",
                  "rtf",
                  "txt"
                ]
              }
            },
            {
              "Id": "MAX_OCCURRENCES",
              "Parameters": {
                "Count": 10
              }
            }
          ]
        }
      ]
    }
    ```
    
    ## Screening questions
    --------------------------
    The `/inquiry` endpoint can provide a list of screening questions, which are structured as follows:
      ```
      {
        "Id": "string",
        "Label": "string",
        "Repeatable": boolean,
        "Fields": [
          {
            "Id": "string",
            "Label": "string",
            "Type": "string",
            "Required": boolean,
            "Validations": [
              {
                "Id": "string"
                // properties depend on the specific validation
              }
            ],
            "Values": [
              {
                "Id": "string",
                "Label": "string"
              }
            ],
            "VisibleFor": {
              "FieldId": "string",
              "Values": [
                "string"
              ]
            }
          }
        ]
      }
      ```
    **All the types of Screening questions along with their structure are presented at the collapsible panel below in response examples of [POST /inquiry](#/inquiry/inquiry) endpoint.**
    <br><br>
    ### *BasicData Question Object*
      | Property         | Description |
      | ---------------- | ----------------- |
      | Name             | The name of the basic data question. Available values include FirstName, Surname, Email, Mobile, Gender, CV, CoverLetter, AdditionalDocuments. |
      | Visibility       | Indicates whether an answer to the question is mandatory, optional, or unsupported. |
      | Validations      | Specifies a list of validation rules that should be applied to the answer. See [Validation rules compatibility](#validation-rules-compatibility) |
      --------------------------
    <br>
    ### *Question Object*
      | Property         | Description                                        |
      | ---------------- | ---------------------------------------------------|
      | Id               | Unique identifier of a question                    |
      | Label            | General label of the question block label          |
      | Repeatable       | Indicates if a question can have multiple answers  |
      | Fields           | Single question contains exactly one *Field* object, for Compound questions two or more objects are expected                                            |
      --------------------------
    <br>  
    ### *Field Object*
      | Property         | Description                                                          |
      | ---------------- | ---------------------------------------------------------------------|
      | Id               | Identifier of a field within a question. It is unique within a question scope. In case of single question can be the same as question identifier                                                  |
      | Label            | Label displayed next to input field. This is not needed for simple questions as the *Question* attribute should be sufficient                                                                    |
      | Type             | Type of the input field: <li>**INPUT_TEXT** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_input_text.png)<li>**INPUT_INT** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_input_int.png)<li>**TEXTAREA** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_textarea.png)<li>**DATE** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_date.png)<li>**DATE_RANGE** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_date_range.png)<li>**SINGLE_SELECT** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_single_select.png)<li>**MULTI_SELECT** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_multi_select.png)<li>**RADIO** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_radio.png)<li>**CHECKBOX** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_checkbox.png)<li>**FILE** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_file.png)<li>**HYPERLINK** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_hyperlink.png)<li>**INFORMATION** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_information.png)                                       |
      | Required         | Specifies if an answer is mandatory for a given field                |
      | Values           | List of possible answers. **Applicable only to the following question types: SINGLE_SELECT, MULTI_SELECT, RADIO, CHECKBOX**                                                                      |
      | Validations      | List of validation rules which should be applied to the answer value |
      | VisibleFor       | Utilised by dependent questions when the presence of the *Field* on the form depends on particular answer to the parent question *Field*                             |
      --------------------------
    <br>
    ### *Value Object*
      | Property         | Description                                                          |
      | ---------------- | ---------------------------------------------------------------------|
      | Id               | Identifier of an answer option. It is unique within values scope.    |
      | Label            | Label of an answer option.                                           |
      --------------------------
    <br>
    ### *VisibleFor Object*
      | Property         | Description                                                          |
      | ---------------- | ---------------------------------------------------------------------|
      | FieldId          | Identifier of the parent *Field* object                              |
      | Values           | When the parent field type is: INPUT_TEXT, INPUT_INT, TEXTAREA or DATE then the *Values* property should contain the values expected in the parent input. In case of parent fields of type: SINGLE_SELECT, MULTI_SELECT, RADIO and CHECKBOX the *Values* property should contain the *Ids* (!! not *Labels*) of corresponding *Value* objects                                |
      --------------------------
    <br>
    ### *Validation Object*
      | Property         | Description                                                          |
      | ---------------- | ---------------------------------------------------------------------|
      | Id               | Identifier of a validation rule:<li>**INPUT_TEXT_MIN_MAX_LENGTH** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/validation_min_max_length.png)<li>**INPUT_INT_MIN_MAX** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/validation_min_max_value.png)<li>**DATE_MIN_MAX** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/validation_min_max_date.png)<li>**MAX_SELECTED** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/validation_max_selected.png)<li>**FILE_MAX_SIZE** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/validation_max_file_size.png)<li>**FILE_ACCEPTED_TYPES** [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/validation_unsupported_file_type.png)  |
      | Parameters       | The set of Parameters properties depends on validation rule. More details described at the next table |
      --------------------------
    <br>
    ### Validation rules compatibility {#validation-rules-compatibility}
      | Validation rule           | Compatible BasicData questions and screening question types | Parameters                              |
      | --------------------------| ------------------------- | --------------------------------------- |
      | INPUT_TEXT_MIN_MAX_LENGTH | **BasicData questions**<br>- FirstName,<br>- Surname,<br>- Email,<br>- Mobile<br><br>**Screening questions**<br>- INPUT_TEXT,<br>- TEXTAREA   | <li>MinLength *int* <li>MaxLength *int* |
      | INPUT_INT_MIN_MAX         | **Screening questions**<br>- INPUT_INT                 | <li>MinValue *int* <li>MaxValue *int*   |
      | DATE_MIN_MAX              | **Screening questions**<br>- DATE                      | <li>MinValue *date / {now}\** <li>MaxValue *date / {now}\** <li>MinType *string (__INCLUSIVE / EXCLUSIVE__)* <li>MaxType *string (__INCLUSIVE / EXCLUSIVE__)*  |
      | MAX_SELECTED              | **Screening questions**<br>- MULTI_SELECT              | <li>Count *int*                         |
      | FILE_MAX_SIZE             | **BasicData questions**<br>- CV,<br>- CoverLetter,<br>- AdditionalDocuments<br><br>**Screening questions**<br>- FILE                      | <li>MaxSize *int* (__in bytes__)        |
      | FILE_ACCEPTED_TYPES       | **BasicData questions**<br>- CV,<br>- CoverLetter,<br>- AdditionalDocuments<br><br>**Screening questions**<br>- FILE                      | <li>AcceptedTypes *array of strings*    |
    --------------------------
    \* wildcard __`{now}`__ will put today's date
    <br><br>
    ### Compound question
    --------------------------
    This is a type of *Question* having nested list of *Fields* logically connected to each other. 
    <br>Typical examples of compound questions are:
      - Address [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_compound_address.png)
      - Employment History [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_compound_employment_history.png)
      - Education History [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_compound_education_history.png)
      - etc.
    <br><br>
    ### Dependent question
    --------------------------
    This is a sort of Compound question having one *Field* which presence on the form depends on provided answer to another parent *Field*. It is implemented using *VisibleFor* property, which should be defined at child *Field* object. *VisibleFor* object has properies *FieldId* (Identifier of the parent *Field* object) and Values (array of string values). When the parent field type is: INPUT_TEXT, INPUT_INT, TEXTAREA or DATE then the *Values* property should contain the values expected in the parent input. In case of parent fields of type: SINGLE_SELECT, MULTI_SELECT, RADIO and CHECKBOX the *Values* property should contain the *Ids* (!! not *Labels*) of corresponding *Value* objects. 
    <br>Typical examples of dependent questions are:
      - Contry-Region bundle (where Region question depends on selected Country) [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_dependent_country.png)
      - Radio question with option "Other" where other value can be provided in dependent input field [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_dependent_other.png)
      - etc.
    <br><br>
    ### Repeatable question
    --------------------------
    This is a regular or compound *Question* where multiple answers (groups of answers) are expected. To make a *Question* repeatable, the *Repeatable* property must be set to *true*. 
    <br>Typical examples of repeatable questions are:
     - What languages do you speak? (multiple language name values expected) [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_repeatable_language.png)
     - Employment History (multiple groups of answers can be provided depending on number of employers) [(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/question_repeatable_employment_history.png)
     - etc.
    <br><br>
    ## Consents
    --------------------------
    Consents is a section that defines various mandatory and optional Data Privacy related statements such as Privacy Policy, Terms and Conditions and other agreements that must be presented to the candidates and accepted by them when applying for a job. **There is no possibility to submit an application without accepting Mandatory consents!**
    
    The structure of Mandatory and Optional consents which presented on the application form looks next way:
    ![(_click to see preview_)](https://developer.atsi-apply.com/wp-content/uploads/2020/12/consents_structure.png)
    
    # Apply
    Apply endpoint serves to submit an application to ATS along with the candidate's data, resume, answers on screening questions and consents. A full model of Apply request/response along with their structure can be found at the collapsible panel below of **[POST /apply](#/apply/apply)** endpoint.
    
    # Authentication
    The ATSi API can support the authentication of all requests if it's implemented by the ATS. However, it is optional for an ATS to adhere to this specification. An ATS may opt to not implement any authentication on the API layer, but use another security mechanism, like source IP whitelisting, for example.
    
    Currently, the only supported security scheme is API Key authentication.
    
    ## API Key authentication
    In this scheme, both the API server (ATS) and the API client (ATSi Apply) share a secret, known as an API Key. This API Key value secures all operations in this API similarly: if it's implemented, none of the operations will succeed unless a valid API Key is used.
    
    The ATS issues the API keys to its clients and then shares them with ATSi Apply. The method of issuing the keys to its clients is at the discretion of the ATS.
    
    All requests made by ATSi Apply to the ATS will contain the value of the API Key in the HTTP header named `apiKey`, unless another parameter name is agreed with ATSi Apply (to agree a custom API Key parameter name please contact ATSi Apply Team).
    
    The server should verify the value of the API Key for each request. If a request does not contain a valid API Key, the server should respond with HTTP 401 Unauthorized status code (refer below for an example response body).
    
    **NOTE:** It is crucial to secure the endpoints with HTTPS, otherwise the API Keys could be easily compromised, as they are transmitted as plain text.
  contact:
    name: ATSi Apply Team
    url: https://www.atsi-apply.com
    email: atsiapply@stepstone.com
  version: V4
servers: []
security:
  - ApiKeyAuthentication: []
paths:
  /inquiry:
    post:
      tags:
        - Inquiry
      description: |-
        Returns job details including job status, screening questions and consents. 
        
        **Please note that for the screening questions to be present on the job application form in the apply process with ATSi, it is mandatory to provide them in the Inquiry Response, it is not enough to push them through the XML Feed.**
      operationId: inquiry
      requestBody:
        description: Job details request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobDetailsRequest'
            examples:
              Sample request:
                value:
                  Header:
                    Id: 43c3be16-0f93-41ed-9cc0-9092222d7ac1
                    JobBoardId: totaljobs
                    JobBoardName: Totaljobs
                    OriginalUrl: https://aplitrak.com/hays/12345
                    EffectiveUrl: https://hays.co.uk/12345
        required: true
      responses:
        '200':
          description: |-
            Job details response
            
            #### **Inquiry Response examples are connected to Apply Request examples. Question objects have corresponding Ids to Answer objects, so to see how to build an Answer for particular Question from *"Active job with screening question of type INPUT_TEXT"* example, please open *"Apply request with answer on screening question of type INPUT_TEXT"* example in Apply section.**
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobDetailsResponse'
              examples:
                Active job with basic data, screening questions and consents:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      BasicData:
                        - Name: FirstName
                          Visibility: REQUIRED
                          Validations:
                            - Id: INPUT_TEXT_MIN_MAX_LENGTH
                              Parameters:
                                MinLength: 1
                                MaxLength: 128
                        - Name: Surname
                          Visibility: REQUIRED
                          Validations:
                            - Id: INPUT_TEXT_MIN_MAX_LENGTH
                              Parameters:
                                MinLength: 1
                                MaxLength: 128
                        - Name: Email
                          Visibility: REQUIRED
                        - Name: Mobile
                          Visibility: OPTIONAL
                          Validations:
                            - Id: INPUT_TEXT_MIN_MAX_LENGTH
                              Parameters:
                                MinLength: 0
                                MaxLength: 128
                        - Name: Gender
                          Visibility: UNSUPPORTED
                        - Name: CV
                          Visibility: REQUIRED
                          Validations:
                            - Id: FILE_MAX_SIZE
                              Parameters:
                                MaxSize: 2097152
                            - Id: FILE_ACCEPTED_TYPES
                              Parameters:
                                AcceptedTypes:
                                  - doc
                                  - docx
                                  - jpeg
                                  - jpg
                                  - pdf
                                  - png
                                  - rtf
                                  - txt
                        - Name: CoverLetter
                          Visibility: OPTIONAL
                          Validations:
                            - Id: FILE_MAX_SIZE
                              Parameters:
                                MaxSize: 2097152
                            - Id: FILE_ACCEPTED_TYPES
                              Parameters:
                                AcceptedTypes:
                                  - doc
                                  - docx
                                  - pdf
                                  - txt
                        - Name: AdditionalDocuments
                          Visibility: OPTIONAL
                          Validations:
                            - Id: FILE_MAX_SIZE
                              Parameters:
                                MaxSize: 2097152
                            - Id: FILE_ACCEPTED_TYPES
                              Parameters:
                                AcceptedTypes:
                                  - doc
                                  - docx
                                  - jpeg
                                  - jpg
                                  - pdf
                                  - png
                                  - rtf
                                  - txt
                            - Id: MAX_OCCURRENCES
                              Parameters:
                                Count: 10
                      Questions:
                        - Id: 6be8674d-a6b3-491f-9db1-b8519e1413ee
                          Label: What is your current position?
                          Repeatable: false
                          Fields:
                            - Id: 6be8674d-a6b3-491f-9db1-b8519e1413ee
                              Label: What is your current position?
                              Type: INPUT_TEXT
                              Required: true
                              Validations:
                                - Id: INPUT_TEXT_MIN_MAX_LENGTH
                                  Parameters:
                                    MinLength: 3
                                    MaxLength: 40
                        - Id: 12f4c62b-d38d-4606-9886-b860026edce2
                          Label: What are your salary expectations? (gross in EURO per year)
                          Repeatable: false
                          Fields:
                            - Id: 12f4c62b-d38d-4606-9886-b860026edce2
                              Label: What are your salary expectations? (gross in EURO per year)
                              Type: INPUT_INT
                              Required: false
                              Validations:
                                - Id: INPUT_INT_MIN_MAX
                                  Parameters:
                                    MinValue: 0
                                    MaxValue: 100000
                        - Id: 8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd
                          Label: Please describe your experience relevant for this position
                          Repeatable: false
                          Fields:
                            - Id: 8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd
                              Label: Please describe your experience relevant for this position
                              Type: TEXTAREA
                              Required: false
                              Validations:
                                - Id: INPUT_TEXT_MIN_MAX_LENGTH
                                  Parameters:
                                    MaxLength: 1000
                        - Id: ea0a89d0-c172-40c4-baaf-a43326b38c5c
                          Label: What is your birth date?
                          Repeatable: false
                          Fields:
                            - Id: ea0a89d0-c172-40c4-baaf-a43326b38c5c
                              Label: What is your birth date?
                              Type: DATE
                              Required: false
                              Validations:
                                - Id: DATE_MIN_MAX
                                  Parameters:
                                    MinValue: 1930-01-01
                                    MinType: INCLUSIVE
                                    MaxValue: '{now}'
                                    MaxType: EXCLUSIVE
                        - Id: a97f37de-3e6f-4642-b880-55d93fa5104e
                          Label: When did you attend to the primary school?
                          Repeatable: false
                          Fields:
                            - Id: a97f37de-3e6f-4642-b880-55d93fa5104e
                              Label: When did you attend to the primary school?
                              Type: DATE_RANGE
                              Required: false
                        - Id: fe5cc6b3-c507-4688-a44d-f5092f1cc2e9
                          Label: What is your gender?
                          Repeatable: false
                          Fields:
                            - Id: fe5cc6b3-c507-4688-a44d-f5092f1cc2e9
                              Label: What is your gender?
                              Type: SINGLE_SELECT
                              Required: false
                              Values:
                                - Id: b77b57b4-ea8f-4d58-9fb7-6db374f49bf8
                                  Label: Male
                                - Id: 9436c66e-0086-4ade-985c-d40cf700d714
                                  Label: Female
                                - Id: 83ad5f74-4c99-404a-9b92-519086a9f9f0
                                  Label: Prefer not to disclose
                        - Id: b0fc1d41-208a-4fe1-a0fd-46c170f59acf
                          Label: Are you eligible to work in the EU?
                          Repeatable: false
                          Fields:
                            - Id: b0fc1d41-208a-4fe1-a0fd-46c170f59acf
                              Label: Are you eligible to work in the EU?
                              Type: RADIO
                              Required: true
                              Values:
                                - Id: 6720a5ed-b463-40fa-bfbf-49f0ed489644
                                  Label: Yes
                                - Id: 01d42f66-9505-494d-be69-3e6b6d1f1dc7
                                  Label: No
                        - Id: d2b2efc5-f315-4a64-98f6-8ef1bd874096
                          Label: We have few different offices, could you share where you'd prefer to be based if you'll join us?
                          Repeatable: false
                          Fields:
                            - Id: d2b2efc5-f315-4a64-98f6-8ef1bd874096
                              Label: We have few different offices, could you share where you'd prefer to be based if you'll join us?
                              Type: MULTI_SELECT
                              Required: false
                              Validations:
                                - Id: MAX_SELECTED
                                  Parameters:
                                    Count: 3
                              Values:
                                - Id: 2a5c3c0e-967f-42e2-ac86-2c36cb21d95d
                                  Label: Amsterdam
                                - Id: 1e0f7aa1-5d71-459e-8292-1d9b6fc828ba
                                  Label: Berlin
                                - Id: d69004fe-f1f9-4772-bc3c-b140c1b9973c
                                  Label: Dublin
                                - Id: f1d07ac7-d7a6-4e71-85b7-7de2fee0524e
                                  Label: London
                                - Id: 4e5aed31-28f1-4945-8e17-6f371f03c63c
                                  Label: Paris
                                - Id: 48ae81ce-dcf4-430c-a13a-beab6d2a0170
                                  Label: Stuttgart
                                - Id: a0329470-a067-446a-a0ac-30e82750da31
                                  Label: Warsaw
                        - Id: 5091a2e4-4f4c-481b-b4b3-756e84ca8d49
                          Label: Please upload additional documents
                          Repeatable: false
                          Fields:
                            - Id: 5091a2e4-4f4c-481b-b4b3-756e84ca8d49
                              Label: Please upload additional documents
                              Type: INFORMATION
                              Required: false
                        - Id: f1087e90-cf81-4900-b19c-1f8dc71539dd
                          Label: Driver's license
                          Repeatable: false
                          Fields:
                            - Id: f1087e90-cf81-4900-b19c-1f8dc71539dd
                              Label: Driver's license
                              Type: FILE
                              Required: false
                              Validations:
                                - Id: FILE_MAX_SIZE
                                  Parameters:
                                    MaxSize: 2097152
                                - Id: FILE_ACCEPTED_TYPES
                                  Parameters:
                                    AcceptedTypes:
                                      - 'jpg'
                                      - 'doc'
                                      - 'docx'
                                      - 'pdf'
                        - Id: c49fabe6-9dea-431b-8f69-b00c67bca347
                          Label: Please provide address of your portfolio website
                          Repeatable: false
                          Fields:
                            - Id: c49fabe6-9dea-431b-8f69-b00c67bca347
                              Label: Please provide address of your portfolio website
                              Type: HYPERLINK
                              Required: false
                        - Id: dd71cbe6-15d5-4566-ad3a-b28e5ea2bada
                          Label: I agree to send me information about new offers
                          Repeatable: false
                          Fields:
                            - Id: dd71cbe6-15d5-4566-ad3a-b28e5ea2bada
                              Label: I agree to send me information about new offers
                              Type: CHECKBOX
                              Required: false
                              Values:
                                - Id: b702b57e-b776-42b6-baf3-c954de41144d
                                  Label: Confirmed
                      Consents:
                        Mandatory:
                          - Id: ACMEPP
                            OrgName: Acme Software
                            DocumentType: PRIVACY_POLICY
                            Url: https://www.acme.com/about/privacy-policy
                        Optional: []
                Active job with mandatory and optional consents:
                  value:
                    Header:
                      Id: a64cde74-6b40-48b2-b65e-fd9f53fd3d40
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions: []
                      Consents:
                        Mandatory:
                          - Id: data-privacy-consent
                            OrgName: Salmon HR
                            DocumentType: PRIVACY_POLICY
                            Url: https://career.salmonhr.com/en/privacy-statement-career
                          - Id: terms-and-conditions-consent
                            OrgName: Salmon HR
                            DocumentType: TERMS_AND_CONDITIONS
                            Url: https://career.salmonhr.com/en/terms-and-conditions-career
                        Optional:
                          - Id: optional-consent-text
                            Content: I want to receive e-mails about other vacancies
                            ConsentType: TEXT
                          - Id: optional-consent-text-with-link
                            Content: 'I have read the '
                            ConsentType: TEXT_WITH_LINK
                            LinkName: Recruitment policy
                            Url: https://www.salmonhr.com/career/recruitment-policy.html
                Active job without questions and consents:
                  value:
                    Header:
                      Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                Active job with screening question of type INPUT_TEXT:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: 6be8674d-a6b3-491f-9db1-b8519e1413ee
                          Label: What is your current position?
                          Repeatable: false
                          Fields:
                            - Id: 6be8674d-a6b3-491f-9db1-b8519e1413ee
                              Label: What is your current position?
                              Type: INPUT_TEXT
                              Required: true
                              Validations:
                                - Id: INPUT_TEXT_MIN_MAX_LENGTH
                                  Parameters:
                                    MinLength: 3
                                    MaxLength: 40
                Active job with screening question of type INPUT_INT:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: 12f4c62b-d38d-4606-9886-b860026edce2
                          Label: What are your salary expectations? (gross in EURO per year)
                          Repeatable: false
                          Fields:
                            - Id: 12f4c62b-d38d-4606-9886-b860026edce2
                              Label: What are your salary expectations? (gross in EURO per year)
                              Type: INPUT_INT
                              Required: false
                              Validations:
                                - Id: INPUT_INT_MIN_MAX
                                  Parameters:
                                    MinValue: 0
                                    MaxValue: 100000
                Active job with screening question of type TEXTAREA:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: 8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd
                          Label: Please describe your experience relevant for this position
                          Repeatable: false
                          Fields:
                            - Id: 8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd
                              Label: Please describe your experience relevant for this position
                              Type: TEXTAREA
                              Required: false
                              Validations:
                                - Id: INPUT_TEXT_MIN_MAX_LENGTH
                                  Parameters:
                                    MaxLength: 1000
                Active job with screening question of type DATE:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: ea0a89d0-c172-40c4-baaf-a43326b38c5c
                          Label: What is your birth date?
                          Repeatable: false
                          Fields:
                            - Id: ea0a89d0-c172-40c4-baaf-a43326b38c5c
                              Label: What is your birth date?
                              Type: DATE
                              Required: false
                              Validations:
                                - Id: DATE_MIN_MAX
                                  Parameters:
                                    MinValue: 1930-01-01
                                    MinType: INCLUSIVE
                                    MaxValue: '{now}'
                                    MaxType: EXCLUSIVE
                Active job with screening question of type DATE_RANGE:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: a97f37de-3e6f-4642-b880-55d93fa5104e
                          Label: When did you attend to the primary school?
                          Repeatable: false
                          Fields:
                            - Id: a97f37de-3e6f-4642-b880-55d93fa5104e
                              Label: When did you attend to the primary school?
                              Type: DATE_RANGE
                              Required: false
                Active job with screening question of type SINGLE_SELECT:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: fe5cc6b3-c507-4688-a44d-f5092f1cc2e9
                          Label: What is your gender?
                          Repeatable: false
                          Fields:
                            - Id: fe5cc6b3-c507-4688-a44d-f5092f1cc2e9
                              Label: What is your gender?
                              Type: SINGLE_SELECT
                              Required: false
                              Values:
                                - Id: b77b57b4-ea8f-4d58-9fb7-6db374f49bf8
                                  Label: Male
                                - Id: 9436c66e-0086-4ade-985c-d40cf700d714
                                  Label: Female
                                - Id: 83ad5f74-4c99-404a-9b92-519086a9f9f0
                                  Label: Prefer not to disclose
                Active job with screening question of type RADIO:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: b0fc1d41-208a-4fe1-a0fd-46c170f59acf
                          Label: Are you eligible to work in the EU?
                          Repeatable: false
                          Fields:
                            - Id: b0fc1d41-208a-4fe1-a0fd-46c170f59acf
                              Label: Are you eligible to work in the EU?
                              Type: RADIO
                              Required: true
                              Values:
                                - Id: 6720a5ed-b463-40fa-bfbf-49f0ed489644
                                  Label: Yes
                                - Id: 01d42f66-9505-494d-be69-3e6b6d1f1dc7
                                  Label: No
                Active job with screening question of type MULTI_SELECT:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: d2b2efc5-f315-4a64-98f6-8ef1bd874096
                          Label: We have few different offices, could you share where you'd prefer to be based if you'll join us?
                          Repeatable: false
                          Fields:
                            - Id: d2b2efc5-f315-4a64-98f6-8ef1bd874096
                              Label: We have few different offices, could you share where you'd prefer to be based if you'll join us?
                              Type: MULTI_SELECT
                              Required: false
                              Validations:
                                - Id: MAX_SELECTED
                                  Parameters:
                                    Count: 3
                              Values:
                                - Id: 2a5c3c0e-967f-42e2-ac86-2c36cb21d95d
                                  Label: Amsterdam
                                - Id: 1e0f7aa1-5d71-459e-8292-1d9b6fc828ba
                                  Label: Berlin
                                - Id: d69004fe-f1f9-4772-bc3c-b140c1b9973c
                                  Label: Dublin
                                - Id: f1d07ac7-d7a6-4e71-85b7-7de2fee0524e
                                  Label: London
                                - Id: 4e5aed31-28f1-4945-8e17-6f371f03c63c
                                  Label: Paris
                                - Id: 48ae81ce-dcf4-430c-a13a-beab6d2a0170
                                  Label: Stuttgart
                                - Id: a0329470-a067-446a-a0ac-30e82750da31
                                  Label: Warsaw
                Active job with screening question of type INFORMATION:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: 5091a2e4-4f4c-481b-b4b3-756e84ca8d49
                          Label: Please upload additional documents
                          Repeatable: false
                          Fields:
                            - Id: 5091a2e4-4f4c-481b-b4b3-756e84ca8d49
                              Label: Please upload additional documents
                              Type: INFORMATION
                              Required: false
                Active job with screening question of type FILE:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: f1087e90-cf81-4900-b19c-1f8dc71539dd
                          Label: Driver's license
                          Repeatable: false
                          Fields:
                            - Id: f1087e90-cf81-4900-b19c-1f8dc71539dd
                              Label: Driver's license
                              Type: FILE
                              Required: false
                              Validations:
                                - Id: FILE_MAX_SIZE
                                  Parameters:
                                    MaxSize: 2097152
                                - Id: FILE_ACCEPTED_TYPES
                                  Parameters:
                                    AcceptedTypes:
                                      - 'doc'
                                      - 'docx'
                                      - 'jpg'
                                      - 'pdf'
                Active job with screening question of type HYPERLINK:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: c49fabe6-9dea-431b-8f69-b00c67bca347
                          Label: Please provide address of your portfolio website
                          Repeatable: false
                          Fields:
                            - Id: c49fabe6-9dea-431b-8f69-b00c67bca347
                              Label: Please provide address of your portfolio website
                              Type: HYPERLINK
                              Required: false
                Active job with screening question of type CHECKBOX:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: dd71cbe6-15d5-4566-ad3a-b28e5ea2bada
                          Repeatable: false
                          Fields:
                            - Id: dd71cbe6-15d5-4566-ad3a-b28e5ea2bada
                              Label: I agree to send me information about new offers
                              Type: CHECKBOX
                              Required: false
                              Values:
                                - Id: b702b57e-b776-42b6-baf3-c954de41144d
                                  Label: Confirmed
                Active job with Repeatable screening question:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: b98d66ef-aa98-45b7-a811-5ab0e13525f9
                          Label: What languages do you speak?
                          Repeatable: true
                          Fields:
                            - Id: b98d66ef-aa98-45b7-a811-5ab0e13525f9
                              Label: What languages do you speak?
                              Type: INPUT_TEXT
                              Required: true
                Active job with Compound screening question:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: 389392b6-4a45-47f8-a591-de27aacc7ece
                          Label: Employment History
                          Repeatable: true
                          Fields:
                            - Id: 2befea6a-7218-4a3b-a8c5-8b9ec6682fd1
                              Label: Company Name
                              Type: INPUT_TEXT
                              Required: true
                            - Id: 8a2738a6-1160-43c6-b31c-0b18560a3b2e
                              Label: Period
                              Type: DATE_RANGE
                              Required: false
                            - Id: 13e33048-9d2b-4db8-b7d0-2b4f068352af
                              Type: CHECKBOX
                              Required: false
                              Values:
                                - Id: fb89e585-5a4c-4043-b895-6aefb870d623
                                  Label: Current employer
                Active job with Dependent screening question:
                  value:
                    Header:
                      Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                      Status: OK
                    Body:
                      JobStatus: ACTIVE
                      Questions:
                        - Id: 8435922a-6373-428a-b3cd-1c321c91f2c9
                          Repeatable: false
                          Fields:
                            - Id: 5b322ab5-bead-4a6e-9262-27cff0dbcbc5
                              Label: How did you hear about this vacancy?
                              Type: SINGLE_SELECT
                              Required: false
                              Values:
                                - Id: custom_question_via_campaign
                                  Label: Marketing campaign
                                - Id: custom_question_via_friend
                                  Label: Via friend
                                - Id: custom_question_advertisement
                                  Label: Advertisement
                                - Id: custom_question_other
                                  Label: Other
                            - Id: 8c3d315e-29e8-46de-84ee-91f581155476
                              Label: Please enter other option
                              Type: INPUT_TEXT
                              Required: true
                              VisibleFor:
                                FieldId: 5b322ab5-bead-4a6e-9262-27cff0dbcbc5
                                Values:
                                  - custom_question_other
                Expired job:
                  value:
                    Header:
                      Id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      Status: OK
                    Body:
                      JobStatus: EXPIRED
                Error response - Invalid request:
                  value:
                    Header:
                      Id: 9c9ee0e6-5c9a-49f2-9b66-171a5a529e8e
                      Status: ERROR
                      ErrorMsg: INVALID_REQUEST
                      ErrorDesc: 'Required field missing: Id'
                Error response - Job not available:
                  value:
                    Header:
                      Id: 4ac50637-111f-4b5d-965e-7ee88971d079
                      Status: ERROR
                      ErrorMsg: JOB_NOT_AVAILABLE
                      ErrorDesc: Job is not available
                Error response - Job not integrated:
                  value:
                    Header:
                      Id: 011e0428-7cb3-45b7-a847-ee72bea45480
                      Status: ERROR
                      ErrorMsg: JOB_NOT_INTEGRATED
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
              example:
                Header:
                  Id: dc297f7c-36a9-49fa-a29d-8bf80fdd4094
                  Status: ERROR
                  ErrorMsg: UNAUTHORIZED
                  ErrorDesc: HTTP Header -> apiKey is missing or invalid
  /apply:
    post:
      tags:
        - Apply
      description: Sends an application to ATS along with the candidate's data, resume, answers on screening questions and consents.
      operationId: apply
      requestBody:
        description: |-
          Apply request
          
          #### **Apply Request examples are connected to Inquiry Response examples. Answer objects have corresponding Ids to Question objects, so to see how to build an Answer for particular Question from *"Active job with screening question of type INPUT_TEXT"* example, please open *"Apply request with answer on screening question of type INPUT_TEXT"* example in Apply section.**
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyRequest'
            examples:
              Apply request with full job seeker's data but without answers to screening questions:
                value:
                  Header:
                    Id: d2f4a1a3-082a-46b8-8019-8bb66562252c
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    BirthDate: '1987-02-08'
                    Gender: FEMALE
                    Mobile: '987456321'
                    Telephone: '123654789'
                    Address:
                      PostalCode: 00-001
                      StreetName: Domaniewska
                      BuildingNumber: '55'
                      City: Warsaw
                      Country: Poland
                      CountryCode: PL
                      Unit: v
                    JobTitle: tester
                    PrimaryLanguage: english
                    Nationality: polish
                    SalaryRangeMin: '5000'
                    SalaryRangeMax: '6000'
                    SalaryCurrency: PLN
                    SalaryType: Annual
                    WorkEligibility: EU
                    MessageToRecruiter: Hello it's me
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    CoverLetter:
                      BinaryData: bmFtZTogQm9iDQpzdXJuYW1lOiBTZWVrZXINCmVtYWlsOiBib2Iuc2Vla2VyQHVuZW1wbG95ZWRib2IuY29tDQp0ZWw6ICs0NCAxMjMzMjExMjM=
                      FileType: doc
                      FileName: coverletter.doc
                    AdditionalDocuments:
                      - BinaryData: bmFtZTogQm9iDQpzdXJuYW1lOiBTZWVrZXINCmVtYWlsOiBib2Iuc2Vla2VyQHVuZW1wbG95ZWRib2IuY29tDQp0ZWw6ICs0NCAxMjMzMjExMjM=
                        FileType: docx
                        FileName: Certificate.docx
                      - BinaryData: bmFtZTogQm9iDQpzdXJuYW1lOiBTZWVrZXINCmVtYWlsOiBib2Iuc2Vla2VyQHVuZW1wbG95ZWRib2IuY29tDQp0ZWw6ICs0NCAxMjMzMjExMjM=
                        FileType: docx
                        FileName: Licence.docx
                    Answers: []
                    EmploymentHistory:
                      CurrentEmployer: Wyndeham Press Group Ltd Group
                      Items:
                        - EmployerOrganizationName: Wyndeham Press Group Ltd Group
                          PositionHistory:
                            - OrganizationName: Wyndeham Press Group Ltd Group
                              Title: HR Manager
                              Location: London
                              Period:
                                Start: '2019-12-01'
                                End: '2020-11-30'
                            - OrganizationName: Wyndeham Press Group Ltd Group
                              Title: HR Director
                              Location: London
                              Period:
                                Start: '2020-12-01'
                          Current: true
                          EmploymentSummary: As a HR Director as was responsible for ...
                        - EmployerOrganizationName: Acme Corporation
                          PositionHistory:
                            - OrganizationName: Acme Corporation - London Office
                              Title: Group HR Manager
                          Current: false
                          EmploymentSummary: As a Group HR Manager as was responsible for ...
                    Education:
                      HighestDegree:
                        DegreeType: Masters
                        FieldOfStudy: M.C.I. N.V.Q Level 4, First Line Management
                      Items:
                        - DegreeName: residential, Professional Business Advisor
                          EducationItemSummary: 1998 - Durham University Business School - 3 day residential, Professional Business Advisor
                          SchoolType: Bachelors
                          DegreeType: Bachelors
                          SchoolName: Durham University Business School
                          StartDate: '1998-01-09'
                          EndDate: '2001-05-31'
                          Major: Business Administration
                    Qualifications:
                      - GroupName: Computer Skills
                        Competencies:
                          - Name: Word
                          - Name: Excel
                      - GroupName: Natural Languages
                        Competencies:
                          - Name: english
                      - GroupName: Personal Skills
                        Competencies:
                          - Name: flexibility
                          - Name: strategic player
                      - GroupName: Other Skills
                        Competencies:
                          - Name: employee relations
                          - Name: HR - employee relations
                    Consents:
                      Mandatory:
                        - Id: 78bc8bc9-4990-41a8-83fa-e435eaf6e4b5
                          OrgName: Compass Group UK and Ireland Limited
                          Url: https://www.compass-careers.co.uk/members/modules/hf/privacy.php
                          DocumentType: PRIVACY_POLICY
                          Accepted: 'YES'
                        - Id: e06a2f20-3616-4318-a7b2-5199594dcfd5
                          OrgName: Compass Group UK and Ireland Limited
                          Url: https://www.compass-careers.co.uk/members/modules/hf/terms.php
                          DocumentType: TERMS_AND_CONDITIONS
                          Accepted: 'YES'
                      Optional:
                        - Id: 65c13cc3-f161-4992-89a7-20f15c32cbf1
                          Content: 'By checking this box, you will declare that you read and agree to Compass Group''s '
                          LinkName: Recruitment Policy
                          Url: https://www.compass-careers.co.uk/members/modules/hf/recruitment-policy.php
                          ConsentType: TEXT_WITH_LINK
                          Accepted: 'NO'
              Apply request with answers to screening questions and consents:
                value:
                  Header:
                    Id: d2f4a1a3-082a-46b8-8019-8bb66562252c
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: 6be8674d-a6b3-491f-9db1-b8519e1413ee
                        Records:
                          - Fields:
                              6be8674d-a6b3-491f-9db1-b8519e1413ee:
                                - 'Account Manager'
                      - QuestionId: 12f4c62b-d38d-4606-9886-b860026edce2
                        Records:
                          - Fields:
                              12f4c62b-d38d-4606-9886-b860026edce2:
                                - '65000'
                      - QuestionId: 8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd
                        Records:
                          - Fields:
                              8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd:
                                - 'I have 5 years experience on this position, worked in multiple companies and I like this job'
                      - QuestionId: ea0a89d0-c172-40c4-baaf-a43326b38c5c
                        Records:
                          - Fields:
                              ea0a89d0-c172-40c4-baaf-a43326b38c5c:
                                - '1983-09-23'
                      - QuestionId: a97f37de-3e6f-4642-b880-55d93fa5104e
                        Records:
                          - Fields:
                              a97f37de-3e6f-4642-b880-55d93fa5104e:
                                - From: '1989-09-01'
                                  To: '1994-05-25'
                      - QuestionId: fe5cc6b3-c507-4688-a44d-f5092f1cc2e9
                        Records:
                          - Fields:
                              fe5cc6b3-c507-4688-a44d-f5092f1cc2e9:
                                - 'b77b57b4-ea8f-4d58-9fb7-6db374f49bf8'
                      - QuestionId: b0fc1d41-208a-4fe1-a0fd-46c170f59acf
                        Records:
                          - Fields:
                              b0fc1d41-208a-4fe1-a0fd-46c170f59acf:
                                - '6720a5ed-b463-40fa-bfbf-49f0ed489644'
                      - QuestionId: d2b2efc5-f315-4a64-98f6-8ef1bd874096
                        Records:
                          - Fields:
                              d2b2efc5-f315-4a64-98f6-8ef1bd874096:
                                - '1e0f7aa1-5d71-459e-8292-1d9b6fc828ba'
                                - '48ae81ce-dcf4-430c-a13a-beab6d2a0170'
                                - '4e5aed31-28f1-4945-8e17-6f371f03c63c'
                      - QuestionId: f1087e90-cf81-4900-b19c-1f8dc71539dd
                        Records:
                          - Fields:
                              f1087e90-cf81-4900-b19c-1f8dc71539dd:
                                - FileName: license.pdf
                                  BinaryData: --BASE64_CONTENT--
                                  FileType: pdf
                      - QuestionId: c49fabe6-9dea-431b-8f69-b00c67bca347
                        Records:
                          - Fields:
                              c49fabe6-9dea-431b-8f69-b00c67bca347:
                                - 'https://example.com'
                      - QuestionId: dd71cbe6-15d5-4566-ad3a-b28e5ea2bada
                        Records:
                          - Fields:
                              dd71cbe6-15d5-4566-ad3a-b28e5ea2bada:
                                - 'b702b57e-b776-42b6-baf3-c954de41144d'
                    Consents:
                      Mandatory:
                        - Id: 78bc8bc9-4990-41a8-83fa-e435eaf6e4b5
                          OrgName: Acme Group UK and Ireland Limited
                          Url: https://www.acme-careers.co.uk/members/modules/hf/privacy.php
                          DocumentType: PRIVACY_POLICY
                          Accepted: 'YES'
                        - Id: e06a2f20-3616-4318-a7b2-5199594dcfd5
                          OrgName: Acme Group UK and Ireland Limited
                          Url: https://www.acme-careers.co.uk/members/modules/hf/terms.php
                          DocumentType: TERMS_AND_CONDITIONS
                          Accepted: 'YES'
                      Optional:
                        - ConsentType: TEXT
                          Id: 82453de2-00a3-44dd-8fdc-8d53a300d667
                          Content: I want to be automatically alerted when jobs are posted that I might be interested in
                          Accepted: 'YES'
                        - Id: 65c13cc3-f161-4992-89a7-20f15c32cbf1
                          ConsentType: TEXT_WITH_LINK
                          Content: 'By checking this box, you will declare that you read and agree to Acme''s '
                          LinkName: Privacy Policy
                          Url: https://acme.com/european-west/media/1930229/job_applicant_privacy_notice.pdf
                          Accepted: 'NO'
              Apply request with minimal job seeker's data:
                value:
                  Header:
                    Id: 43c3be16-0f93-41ed-9cc0-9092222d7ac1
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
              Apply request with mandatory and optional consents:
                value:
                  Header:
                    Id: 43c3be16-0f93-41ed-9cc0-9092222d7ac1
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Consents:
                      Mandatory:
                        - Id: data-privacy-consent
                          OrgName: Salmon HR
                          Url: https://career.salmonhr.com/en/privacy-statement-career
                          DocumentType: PRIVACY_POLICY
                          Accepted: 'YES'
                        - Id: terms-and-conditions-consent
                          OrgName: Salmon HR
                          Url: https://career.salmonhr.com/en/terms-and-conditions-career
                          DocumentType: TERMS_AND_CONDITIONS
                          Accepted: 'YES'
                      Optional:
                        - ConsentType: TEXT
                          Id: optional-consent-text
                          Content: I want to receive e-mails about other vacancies
                          Accepted: 'NO'
                        - Id: optional-consent-text-with-link
                          ConsentType: TEXT_WITH_LINK
                          Content: 'I have read the '
                          LinkName: Recruitment policy
                          Url: https://www.salmonhr.com/career/recruitment-policy.html
                          Accepted: 'YES'
              Apply request with answer on screening question of type INPUT_TEXT:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: 6be8674d-a6b3-491f-9db1-b8519e1413ee
                        Records:
                          - Fields:
                              6be8674d-a6b3-491f-9db1-b8519e1413ee:
                                - 'Account Manager'
              Apply request with answer on screening question of type INPUT_INT:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: 12f4c62b-d38d-4606-9886-b860026edce2
                        Records:
                          - Fields:
                              12f4c62b-d38d-4606-9886-b860026edce2:
                                - '65000'
              Apply request with answer on screening question of type TEXTAREA:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: 8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd
                        Records:
                          - Fields:
                              8e34ddb1-7429-4b4f-a9ca-a8d2cb6233cd:
                                - 'I have 5 years experience on this position, worked in multiple companies and I like this job'
              Apply request with answer on screening question of type DATE:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: ea0a89d0-c172-40c4-baaf-a43326b38c5c
                        Records:
                          - Fields:
                              ea0a89d0-c172-40c4-baaf-a43326b38c5c:
                                - '1983-09-23'
              Apply request with answer on screening question of type DATE_RANGE:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: a97f37de-3e6f-4642-b880-55d93fa5104e
                        Records:
                          - Fields:
                              a97f37de-3e6f-4642-b880-55d93fa5104e:
                                - From: '1989-09-01'
                                  To: '1994-05-25'
              Apply request with answer on screening question of type SINGLE_SELECT:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: fe5cc6b3-c507-4688-a44d-f5092f1cc2e9
                        Records:
                          - Fields:
                              fe5cc6b3-c507-4688-a44d-f5092f1cc2e9:
                                - 'b77b57b4-ea8f-4d58-9fb7-6db374f49bf8'
              Apply request with answer on screening question of type RADIO:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: b0fc1d41-208a-4fe1-a0fd-46c170f59acf
                        Records:
                          - Fields:
                              b0fc1d41-208a-4fe1-a0fd-46c170f59acf:
                                - '6720a5ed-b463-40fa-bfbf-49f0ed489644'
              Apply request with answer on screening question of type MULTI_SELECT:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: d2b2efc5-f315-4a64-98f6-8ef1bd874096
                        Records:
                          - Fields:
                              d2b2efc5-f315-4a64-98f6-8ef1bd874096:
                                - '1e0f7aa1-5d71-459e-8292-1d9b6fc828ba'
                                - '48ae81ce-dcf4-430c-a13a-beab6d2a0170'
                                - '4e5aed31-28f1-4945-8e17-6f371f03c63c'
              Apply request with answer on screening question of type FILE:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: f1087e90-cf81-4900-b19c-1f8dc71539dd
                        Records:
                          - Fields:
                              f1087e90-cf81-4900-b19c-1f8dc71539dd:
                                - FileName: license.pdf
                                  BinaryData: --BASE64_CONTENT--
                                  FileType: pdf
              Apply request with answer on screening question of type HYPERLINK:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: c49fabe6-9dea-431b-8f69-b00c67bca347
                        Records:
                          - Fields:
                              c49fabe6-9dea-431b-8f69-b00c67bca347:
                                - 'https://example.com'
              Apply request with answer on screening question of type CHECKBOX:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: dd71cbe6-15d5-4566-ad3a-b28e5ea2bada
                        Records:
                          - Fields:
                              dd71cbe6-15d5-4566-ad3a-b28e5ea2bada:
                                - 'b702b57e-b776-42b6-baf3-c954de41144d'
              Apply request with answer on Repeateable screening question:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: b98d66ef-aa98-45b7-a811-5ab0e13525f9
                        Records:
                          - Fields:
                              b98d66ef-aa98-45b7-a811-5ab0e13525f9:
                                - 'English'
                          - Fields:
                              b98d66ef-aa98-45b7-a811-5ab0e13525f9:
                                - 'Spanish'
              Apply request with answer on Compound screening question:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: 389392b6-4a45-47f8-a591-de27aacc7ece
                        Records:
                          - Fields:
                              2befea6a-7218-4a3b-a8c5-8b9ec6682fd1:
                                - 'Foo Company'
                              8a2738a6-1160-43c6-b31c-0b18560a3b2e:
                                - From: '2020-02-01'
                                  To: '2022-03-30'
                          - Fields:
                              2befea6a-7218-4a3b-a8c5-8b9ec6682fd1:
                                - 'Bar Company'
                              8a2738a6-1160-43c6-b31c-0b18560a3b2e:
                                - From: '2022-05-01'
                                  To: '2024-02-01'
                              13e33048-9d2b-4db8-b7d0-2b4f068352af:
                                - 'Bar Company'
              Apply request with answer on Dependent screening question:
                value:
                  Header:
                    Id: d201d6ea-577d-460c-83fc-ae6cf3e47dbd
                    JobBoardId: totaljobs
                    OriginalUrl: http://aplitrack.com/hays/12345
                    EffectiveUrl: http://hays.co.uk/12345
                  Body:
                    FirstName: Max
                    Surname: Payne
                    Email: max.payne@mail.com
                    CV:
                      BinaryData: TWF4IFBheW5lIENW
                      FileType: txt
                      FileName: max_payne_cv.txt
                    Answers:
                      - QuestionId: 8435922a-6373-428a-b3cd-1c321c91f2c9
                        Records:
                          - Fields:
                              5b322ab5-bead-4a6e-9262-27cff0dbcbc5:
                                - 'custom_question_other'
                          - Fields:
                              8c3d315e-29e8-46de-84ee-91f581155476:
                                - 'Directly from job board'
        required: true
      responses:
        '200':
          description: Apply response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplyResponse'
              examples:
                Success:
                  value:
                    Header:
                      Id: 43c3be16-0f93-41ed-9cc0-9092222d7ac1
                      Status: OK
                    Body:
                      Redirect: 'NO'
                Error response with redirect to the original form:
                  value:
                    Header:
                      Id: 1bdfe721-4d66-4d7b-ab58-5c6391d0749d
                      Status: ERROR
                      ErrorMsg: TECHNICAL_ERROR
                      ErrorDesc: Unexpected error occurred
                    Body:
                      BackUrl: https://acme.com/job123
                      Redirect: 'YES'
                Error response - Invalid request:
                  value:
                    Header:
                      Id: 614ae93a-c611-4ce6-8de8-44d59b7e6573
                      Status: ERROR
                      ErrorMsg: INVALID_REQUEST
                      ErrorDesc: 'Required field missing: QuestionId'
                    Body:
                      BackUrl: https://acme.com/job123
                      Redirect: 'YES'
                Error response - Job not available:
                  value:
                    Header:
                      Id: b2a9845e-c003-4638-ac5c-f2ed1b035493
                      Status: ERROR
                      ErrorMsg: JOB_NOT_AVAILABLE
                      ErrorDesc: Job is not available
                    Body:
                      BackUrl: https://acme.com/job_not_available
                      Redirect: 'YES'
                Error response - Duplicated request:
                  value:
                    Header:
                      Id: 88eb37d3-44be-46e3-8e2e-9b6b15eb1f28
                      Status: ERROR
                      ErrorMsg: DUPLICATED_REQUEST
                      ErrorDesc: Duplicated application. The candidate with given email has already applied to this job offer
                    Body:
                      Redirect: 'NO'
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
              example:
                Header:
                  Id: dc297f7c-36a9-49fa-a29d-8bf80fdd4094
                  Status: ERROR
                  ErrorMsg: UNAUTHORIZED
                  ErrorDesc: HTTP Header -> apiKey is missing or invalid
components:
  schemas:
    JobDetailsRequest:
      required:
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/JobDetailsRequestHeader'
    JobDetailsResponse:
      oneOf:
        - $ref: '#/components/schemas/JobDetailsResponseOk'
        - $ref: '#/components/schemas/JobDetailsResponseError'
    JobDetailsResponseOk:
      required:
        - Body
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/JobDetailsResponseHeaderOk'
        Body:
          $ref: '#/components/schemas/InquiryResponseBody'
    JobDetailsResponseError:
      required:
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/JobDetailsResponseHeaderError'
    JobDetailsRequestHeader:
      required:
        - EffectiveUrl
        - Id
        - JobBoardId
        - OriginalUrl
      type: object
      properties:
        Id:
          type: string
          description: Conversation ID as a UUID (a correlation ID which helps to bind together all exchange messages between a job board, ATSi Apply and an ATS)
          format: uuid
        JobBoardId:
          type: string
          description: Unique job board identifier (e.g. totaljobs, stepstone_de, irish_jobs_ie, appcast, pnet_co_za, caterer, cwjobs, etc.)
        JobBoardName:
          type: string
          description: A human readable job board name
        OriginalUrl:
          type: string
          description: An original apply URL published on the job board
          format: url
        EffectiveUrl:
          type: string
          description: An apply URL resolved from an OriginalUrl (if an OriginalUrl points to a final apply page, both URL fields contain the same value)
          format: url
        AtsJobId:
          type: string
          description: An ID of a job as ATS side
    JobDetailsResponseHeaderOk:
      required:
        - Id
        - Status
      type: object
      properties:
        Id:
          type: string
          description: Conversation ID as a UUID (a correlation ID which helps to bind together all exchange messages between a job board, ATSi Apply and an ATS)
          format: uuid
        Status:
          type: string
          enum:
            - OK
    JobDetailsResponseHeaderError:
      required:
        - ErrorMsg
        - Id
        - Status
      type: object
      properties:
        Id:
          type: string
          description: Conversation ID as a UUID (a correlation ID which helps to bind together all exchange messages between a job board, ATSi Apply and an ATS)
          format: uuid
        Status:
          type: string
          enum:
            - ERROR
        ErrorMsg:
          type: string
          enum:
            - JOB_NOT_AVAILABLE
            - JOB_NOT_INTEGRATED
            - INVALID_REQUEST
            - TECHNICAL_ERROR
        ErrorDesc:
          type: string
    InquiryResponseBody:
      required:
        - JobStatus
      type: object
      properties:
        JobStatus:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - EXPIRED
        AtsJobId:
          type: string
        BasicData:
          type: array
          items:
            $ref: '#/components/schemas/BasicDataField'
        Questions:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/Question'
              - $ref: '#/components/schemas/CompoundQuestion'
        Consents:
          $ref: '#/components/schemas/InquiryResponseBodyConsents'
    Question:
      required:
        - Fields
        - Id
        - Label
        - Repeatable
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of a question
        Label:
          type: string
          description: General label of the question block label
        Repeatable:
          type: boolean
          default: false
          description: Indicates if a question can have multiple answers
        Fields:
          description: Single question contains exactly one “Field” object
          maxItems: 1
          minItems: 1
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/QuestionFieldInputText'
              - $ref: '#/components/schemas/QuestionFieldInputInt'
              - $ref: '#/components/schemas/QuestionFieldDate'
              - $ref: '#/components/schemas/QuestionFieldDateRange'
              - $ref: '#/components/schemas/QuestionFieldTextarea'
              - $ref: '#/components/schemas/QuestionFieldFile'
              - $ref: '#/components/schemas/QuestionFieldInformation'
              - $ref: '#/components/schemas/QuestionFieldHyperlink'
              - $ref: '#/components/schemas/QuestionFieldSingleSelect'
              - $ref: '#/components/schemas/QuestionFieldMultiSelect'
              - $ref: '#/components/schemas/QuestionFieldRadio'
              - $ref: '#/components/schemas/QuestionFieldCheckbox'
    CompoundQuestion:
      required:
        - Fields
        - Id
        - Label
        - Repeatable
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of a question
        Label:
          type: string
          description: General label of the question block label
        Repeatable:
          type: boolean
          default: false
          description: Indicates if a question can have multiple answers
        Fields:
          type: array
          description: Compound question expected to contain more than one “Field” object
          items:
            minItems: 1
            anyOf:
              - $ref: '#/components/schemas/QuestionFieldInputText'
              - $ref: '#/components/schemas/QuestionFieldInputInt'
              - $ref: '#/components/schemas/QuestionFieldDate'
              - $ref: '#/components/schemas/QuestionFieldDateRange'
              - $ref: '#/components/schemas/QuestionFieldTextarea'
              - $ref: '#/components/schemas/QuestionFieldFile'
              - $ref: '#/components/schemas/QuestionFieldInformation'
              - $ref: '#/components/schemas/QuestionFieldHyperlink'
              - $ref: '#/components/schemas/QuestionFieldSingleSelect'
              - $ref: '#/components/schemas/QuestionFieldMultiSelect'
              - $ref: '#/components/schemas/QuestionFieldRadio'
              - $ref: '#/components/schemas/QuestionFieldCheckbox'
      description: This kind of question allows to have subquestions under the main question.
    QuestionFieldInputText:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - INPUT_TEXT
        Required:
          type: boolean
        Validations:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ValidationsInputTextMinMaxLength'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldInputInt:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - INPUT_INT
        Required:
          type: boolean
        Validations:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ValidationsInputIntMinMax'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldDate:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - DATE
        Required:
          type: boolean
        Validations:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ValidationsDateMinMax'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldDateRange:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - DATE_RANGE
        Required:
          type: boolean
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldTextarea:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - TEXTAREA
        Required:
          type: boolean
        Validations:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ValidationsInputTextMinMaxLength'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldFile:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - FILE
        Required:
          type: boolean
        Validations:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ValidationsFileMaxSize'
              - $ref: '#/components/schemas/ValidationsFileAcceptedTypes'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldInformation:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - INFORMATION
        Required:
          type: boolean
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldHyperlink:
      required:
        - Id
        - Label
        - Required
        - Type
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - HYPERLINK
        Required:
          type: boolean
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldSingleSelect:
      required:
        - Id
        - Label
        - Required
        - Type
        - Values
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - SINGLE_SELECT
        Required:
          type: boolean
        Values:
          type: array
          items:
            $ref: '#/components/schemas/QuestionFieldValue'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldMultiSelect:
      required:
        - Id
        - Label
        - Required
        - Type
        - Values
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - MULTI_SELECT
        Required:
          type: boolean
        Values:
          type: array
          items:
            $ref: '#/components/schemas/QuestionFieldValue'
        Validations:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/ValidationsMultiSelectMaxSelected'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldRadio:
      required:
        - Id
        - Label
        - Required
        - Type
        - Values
      type: object
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - RADIO
        Required:
          type: boolean
        Values:
          type: array
          items:
            $ref: '#/components/schemas/QuestionFieldValue'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldCheckbox:
      required:
        - Id
        - Label
        - Required
        - Type
        - Values
      type: object
      description: Checkbox question expected as a boolean question with single value option
      properties:
        Id:
          type: string
        Label:
          type: string
        Type:
          type: string
          enum:
            - CHECKBOX
        Required:
          type: boolean
        Values:
          maxItems: 1
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/QuestionFieldValue'
        VisibleFor:
          $ref: '#/components/schemas/QuestionFieldVisibleFor'
    QuestionFieldValue:
      required:
        - Id
        - Label
      type: object
      properties:
        Id:
          type: string
          description: must be unique within a question
        Label:
          type: string
          description: must be unique within a question
    QuestionFieldVisibleFor:
      required:
        - FieldId
        - Values
      type: object
      properties:
        FieldId:
          type: string
          description: Identifier of the parent Field object
        Values:
          type: array
          description: List of answers on parent Field object for which the child Field will be presented
          items:
            type: string
    ValidationsInputTextMinMaxLength:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          enum:
            - INPUT_TEXT_MIN_MAX_LENGTH
        Parameters:
          properties:
            MinLength:
              type: number
            MaxLength:
              type: number
    ValidationsInputIntMinMax:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          enum:
            - INPUT_INT_MIN_MAX
        Parameters:
          properties:
            MinValue:
              type: number
            MaxValue:
              type: number
    ValidationsDateMinMax:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          enum:
            - DATE_MIN_MAX
        Parameters:
          properties:
            MinValue:
              type: string
              format: date
            MaxValue:
              type: string
              format: date
            MinType:
              type: string
              default: 'INCLUSIVE'
              enum:
                - 'INCLUSIVE'
                - 'EXCLUSIVE'
            MaxType:
              type: string
              default: 'INCLUSIVE'
              enum:
                - 'INCLUSIVE'
                - 'EXCLUSIVE'
    ValidationsMultiSelectMaxSelected:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          enum:
            - MAX_SELECTED
        Parameters:
          properties:
            Count:
              type: number
    ValidationsFileMaxSize:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          enum:
            - FILE_MAX_SIZE
        Parameters:
          properties:
            MaxSize:
              type: number
              description: Maximum file size in bytes
    ValidationsFileAcceptedTypes:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          enum:
            - FILE_ACCEPTED_TYPES
        Parameters:
          properties:
            AcceptedTypes:
              type: array
              description: Array of strings with valid file extensions
    BasicDataField:
      required:
        - Name
        - Visibility
      type: object
      properties:
        Name:
          $ref: '#/components/schemas/BasicFieldName'
        Visibility:
          type: string
          enum:
            - REQUIRED
            - OPTIONAL
            - UNSUPPORTED
        Validations:
          type: array
          items:
            $ref: '#/components/schemas/FieldValidation'
    BasicFieldName:
      type: string
      enum:
        - FirstName
        - Surname
        - Email
        - Gender
        - Mobile
        - CV
        - CoverLetter
        - AdditionalDocuments
    FieldValidation:
      required:
        - Id
        - Parameters
      type: object
      properties:
        Id:
          type: string
          description: TODO put description Id of field validation
        Parameters:
          type: object
    MandatoryConsentInquiry:
      required:
        - DocumentType
        - Id
        - OrgName
        - Url
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of the consent
        OrgName:
          type: string
          description: Name of the consent owner Organization
        Url:
          type: string
          format: url
          description: URL address leading to the page with a content of the consent
        DocumentType:
          type: string
          enum:
            - PRIVACY_POLICY
            - TERMS_AND_CONDITIONS
    OptionalConsentTextInquiry:
      required:
        - ConsentType
        - Content
        - Id
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of the consent
        Content:
          type: string
          description: Text of the voluntary consent which should be presented to candidate
        ConsentType:
          type: string
          enum:
            - TEXT
    OptionalConsentTextWithLinkInquiry:
      required:
        - ConsentType
        - Content
        - Id
        - LinkName
        - Url
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of the consent
        Content:
          type: string
          description: Text of the voluntary consent which should be presented to candidate
        ConsentType:
          type: string
          enum:
            - TEXT_WITH_LINK
        LinkName:
          type: string
          description: Text over the link
        Url:
          type: string
          format: url
          description: URL address leading to the page with a content of the consent
    ApplyRequest:
      required:
        - Body
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/ApplyRequestHeader'
        Body:
          $ref: '#/components/schemas/ApplyRequestBody'
    ApplyResponse:
      oneOf:
        - $ref: '#/components/schemas/ApplyResponseOk'
        - $ref: '#/components/schemas/ApplyResponseError'
    ApplyRequestHeader:
      required:
        - EffectiveUrl
        - Id
        - JobBoardId
        - OriginalUrl
      type: object
      properties:
        Id:
          type: string
          description: Conversation ID as a UUID (a correlation ID which helps to bind together all exchange messages between a job board, ATSi Apply and an ATS)
          format: uuid
        JobBoardId:
          type: string
          description: Unique job board identifier (e.g. totaljobs, stepstone_de, irish_jobs_ie, appcast, pnet_co_za, caterer, cwjobs, etc.)
        JobBoardName:
          type: string
          description: A human readable job board name
        OriginalUrl:
          type: string
          description: An original apply URL published on the job board
          format: url
        EffectiveUrl:
          type: string
          description: An apply URL resolved from an OriginalUrl (if an OriginalUrl points to a final apply page, both URL fields contain the same value)
          format: url
    ApplyRequestBody:
      required:
        - CV
        - Email
      type: object
      properties:
        Email:
          type: string
          format: email
        CV:
          $ref: '#/components/schemas/TextDocument'
        FirstName:
          type: string
        Surname:
          type: string
        Answers:
          type: array
          items:
            $ref: '#/components/schemas/Answer'
        Consents:
          type: array
          items:
            $ref: '#/components/schemas/Consents'
        BirthDate:
          type: string
          format: date
        Gender:
          type: string
          enum:
            - FEMALE
            - MALE
            - OTHER
        PrimaryLanguage:
          type: string
        Nationality:
          type: string
        JobTitle:
          type: string
        SalaryType:
          type: string
        SalaryRangeMin:
          type: string
        SalaryRangeMax:
          type: string
        SalaryCurrency:
          type: string
        WorkEligibility:
          type: string
          enum:
            - EU
            - UK
            - NONE
        CoverLetter:
          $ref: '#/components/schemas/TextDocument'
        MessageToRecruiter:
          type: string
        AdditionalDocuments:
          type: array
          items:
            $ref: '#/components/schemas/AdditionalDocument'
        Mobile:
          type: string
        Telephone:
          type: string
        Address:
          $ref: '#/components/schemas/Address'
        EmploymentHistory:
          $ref: '#/components/schemas/EmploymentHistory'
        Education:
          $ref: '#/components/schemas/Education'
        Qualifications:
          type: array
          items:
            $ref: '#/components/schemas/Qualification'
    TextDocument:
      required:
        - BinaryData
        - FileType
      type: object
      properties:
        FileType:
          type: string
          enum:
            - doc
            - docx
            - odt
            - pdf
            - rtf
            - txt
        BinaryData:
          type: string
          format: base64
        FileName:
          type: string
          description: file name
    AdditionalDocument:
      required:
        - BinaryData
        - FileType
      type: object
      properties:
        FileType:
          type: string
          enum:
            - doc
            - docx
            - jpeg
            - jpg
            - odt
            - pdf
            - png
            - rtf
            - txt
        BinaryData:
          type: string
          format: base64
        FileName:
          type: string
          description: file name
    Address:
      type: object
      properties:
        StreetName:
          type: string
        BuidingNumber:
          type: string
        Unit:
          type: string
        PostalCode:
          type: string
        City:
          type: string
        Country:
          type: string
        CountryCode:
          maxLength: 2
          minLength: 2
          type: string
          description: ISO 3166-1 alfa-2
    Answer:
      required:
        - QuestionId
        - Records
      type: object
      properties:
        QuestionId:
          type: string
        Records:
          type: array
          items:
            $ref: '#/components/schemas/AnswerRecord'
    AnswerRecord:
      required:
        - Fields
      type: object
      properties:
        Fields:
          $ref: '#/components/schemas/AnswerField'
    AnswerField:
      minProperties: 1
      type: object
      additionalProperties:
        type: array
        items:
          type: string
    MandatoryConsentApply:
      required:
        - Accepted
        - DocumentType
        - Id
        - OrgName
        - Url
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of the consent
        OrgName:
          type: string
          description: Name of the consent owner Organization
        Url:
          type: string
          format: url
          description: URL address leading to the page with a content of the consent
        DocumentType:
          type: string
          enum:
            - PRIVACY_POLICY
            - TERMS_AND_CONDITIONS
        Accepted:
          type: string
          enum:
            - 'YES'
            - 'NO'
    OptionalConsentTextApply:
      required:
        - Accepted
        - ConsentType
        - Content
        - Id
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of the consent
        Content:
          type: string
          description: Text of the voluntary consent which should be presented to candidate
        ConsentType:
          type: string
          enum:
            - TEXT
        Accepted:
          type: string
          enum:
            - 'YES'
            - 'NO'
    OptionalConsentTextWithLinkApply:
      required:
        - Accepted
        - ConsentType
        - Content
        - Id
        - LinkName
        - Url
      type: object
      properties:
        Id:
          type: string
          description: Unique identifier of the consent
        Content:
          type: string
          description: Text of the voluntary consent which should be presented to candidate
        ConsentType:
          type: string
          enum:
            - TEXT_WITH_LINK
        LinkName:
          type: string
          description: Text over the link
        Url:
          type: string
          format: url
          description: URL address leading to the page with a content of the consent
        Accepted:
          type: string
          enum:
            - 'YES'
            - 'NO'
    ApplyResponseOk:
      required:
        - Body
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/ApplyResponseHeaderOk'
        Body:
          oneOf:
            - $ref: '#/components/schemas/ApplyResponseBodyRedirect'
            - $ref: '#/components/schemas/ApplyResponseBodyNoRedirect'
    ApplyResponseError:
      required:
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/ApplyResponseHeaderError'
        Body:
          oneOf:
            - $ref: '#/components/schemas/ApplyResponseBodyRedirect'
            - $ref: '#/components/schemas/ApplyResponseBodyNoRedirect'
    ApplyResponseHeaderOk:
      required:
        - Id
        - Status
      type: object
      properties:
        Id:
          type: string
          format: uuid
        Status:
          type: string
          enum:
            - OK
    ApplyResponseHeaderError:
      required:
        - ErrorMsg
        - Id
        - Status
      type: object
      properties:
        Id:
          type: string
          format: uuid
        Status:
          type: string
          enum:
            - ERROR
        ErrorMsg:
          type: string
          enum:
            - NOT_INTEGRATED_CUSTOMER
            - JOB_NOT_INTEGRATED
            - JOB_NOT_AVAILABLE
            - DUPLICATED_REQUEST
            - INVALID_REQUEST
            - UNANSWERED_QUESTIONS
            - TECHNICAL_ERROR
        ErrorDesc:
          type: string
    ApplyResponseBodyRedirect:
      required:
        - BackUrl
        - Redirect
      type: object
      properties:
        Redirect:
          type: string
          enum:
            - 'YES'
        BackUrl:
          type: string
          format: url
    ApplyResponseBodyNoRedirect:
      required:
        - Redirect
      type: object
      properties:
        Redirect:
          type: string
          enum:
            - 'NO'
    EmploymentHistory:
      type: object
      properties:
        CurrentEmployer:
          type: string
        Items:
          type: array
          items:
            $ref: '#/components/schemas/Employment'
    Employment:
      type: object
      properties:
        EmployerOrganizationName:
          type: string
        EmploymentSummary:
          type: string
        Current:
          type: boolean
        PositionHistory:
          type: array
          items:
            $ref: '#/components/schemas/Position'
    Position:
      type: object
      properties:
        OrganizationName:
          type: string
        Title:
          type: string
        Location:
          type: string
        Period:
          $ref: '#/components/schemas/Period'
    Period:
      type: object
      properties:
        Start:
          type: string
          format: date
        End:
          type: string
          format: date
    Education:
      type: object
      properties:
        HighestDegree:
          $ref: '#/components/schemas/HighestDegree'
        Items:
          type: array
          items:
            $ref: '#/components/schemas/EducationItem'
    HighestDegree:
      type: object
      properties:
        DegreeType:
          type: string
        FieldOfStudy:
          type: string
    EducationItem:
      type: object
      properties:
        SchoolType:
          type: string
        SchoolName:
          type: string
        DegreeName:
          type: string
        DegreeType:
          type: string
        EducationItemSummary:
          type: string
        StartDate:
          type: string
          format: date
        EndDate:
          type: string
          format: date
        Major:
          type: string
    Qualification:
      type: object
      properties:
        GroupName:
          type: string
        Competencies:
          type: array
          items:
            $ref: '#/components/schemas/Competency'
    Competency:
      type: object
      properties:
        Name:
          type: string
    Consents:
      type: object
      properties:
        Mandatory:
          type: array
          items:
            $ref: '#/components/schemas/MandatoryConsentApply'
        Optional:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/OptionalConsentTextApply'
              - $ref: '#/components/schemas/OptionalConsentTextWithLinkApply'
    UnauthorizedErrorResponse:
      required:
        - Header
      type: object
      properties:
        Header:
          $ref: '#/components/schemas/UnauthorizedErrorResponseHeader'
    UnauthorizedErrorResponseHeader:
      required:
        - ErrorMsg
        - Id
        - Status
      type: object
      properties:
        Id:
          type: string
          format: uuid
        Status:
          type: string
          enum:
            - ERROR
        ErrorMsg:
          type: string
          enum:
            - UNAUTHORIZED
        ErrorDesc:
          type: string
    InquiryResponseBodyConsents:
      type: object
      properties:
        Mandatory:
          maxItems: 2
          type: array
          items:
            $ref: '#/components/schemas/MandatoryConsentInquiry'
        Optional:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/OptionalConsentTextInquiry'
              - $ref: '#/components/schemas/OptionalConsentTextWithLinkInquiry'
  responses:
    UnauthorizedError:
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedErrorResponse'
          example:
            Header:
              Id: dc297f7c-36a9-49fa-a29d-8bf80fdd4094
              Status: ERROR
              ErrorMsg: UNAUTHORIZED
              ErrorDesc: HTTP Header -> apiKey is missing or invalid
  securitySchemes:
    ApiKeyAuthentication:
      type: apiKey
      description: API Key value sent in the `apiKey` HTTP header
      name: apiKey
      in: header