openapi: 3.1.0

info:
  title: API VaaS /Vagas as a Service/
  version: "1.0.0"
  description: |
    ## Introduction

    VaaS (Vagas as a Service) acts as a true recruitment agent, enabling any software platform to leverage the Intelligent Job Posting feature. Through VaaS, Vagas.com clients who use third-party software can automatically publish job openings on Vagas.com via an HTTP request in JSON format.

    Unlike the traditional job posting process, this API allows an external application URL to be included in the job posting, redirecting candidates to another system when they click to apply.

    Another key feature of VaaS is the ability for authorized partners to publish jobs on behalf of their clients. In such cases, the partner can make API requests within the Vagas.com ecosystem using the represented company's information, enabling job postings to be created and managed for third parties, provided the appropriate authorization has been granted.

    ## Technical Requirements

    **Data Delivery**
    - Contract Format: JSON
    - Encoding: UTF-8
    - Authentication: OAuth 2.0 / API Key
    - Transport Security: TLS 1.2
    - Protection Mechanisms: CSRF Protection, Rate Limiting. Web Application Firewall (WAF)

    **Client Requirements**
    - Support for TLS 1.2
    - Support for HTTP 1.2 (or the applicable HTTP version)
    - Configurable timeout and retry policies
    - Identifiable User-Agent: X-Idempotency-Key / X-Client-Id / X-Tenant-Id

    ## Authentication

    The authentication for using this API can be done in two ways:

    - Client Credencials
      - The job will be created with user identification of _admin_ as responsible
    - Autorization Code (3-legged)
      - The job will be created with the given user in the authorization steps as responsible

    ### Client Credencials

    This process consists of a direct POST call to the gateway indicating the credentials to obtain the access token.

    Considering that the credentials were created in the gateway, just make a call according to the example:

    ```
    curl -X POST -k -H 'Content-Type: application/x-www-form-urlencoded' -i 'https://apigateway.vagas.com.br/oauth/token' --data 'grant_type=client_credentials' -u 'client_id:client_secret'
    ```

    The return will be:

    ```json
    {
      "access_token": "asd23sde12e123sd",
      "expires_in": 2591999,
      "token_type": "Bearer"
    }
    ```

    For all other requests below, the __access\_token__ must be
    included in the request as a Authorization HEADER attribute in BEARER token format

    Remembering that __access\_token__ has a time limit for use, the information returned in the key
    __expires\_in__ indicates the number of seconds that the token will expire from its generation date.

    __Exemple request using the __access\_token__:__

    ```shell
    # Example token the must be added in the Authorization HEADER:
    # Authorization: Bearer asd23sde12e123sd
    CURL example:
    curl -XGET <URL TBD>
        --header “Authorization: Bearer asd23sde12e123sd”
    ```

    ### Autorization Code (3-legged)

    This process implements the OAuth 2.0 specification for authentication and authorization.

    The authentication uses the Authorization Code (Three-Legged OAuth) flow, in which the client system redirects the user (registered in Vagas.com) to the Vagas API authorization server.

    #### How to get the token

    The remote service starts the process by calling the PATH /oauth/authorize
    from the Vagas API server, sending as parameters:

    - __client_id__: Application ID (Provided by Vagas team)
    - __login_type__: Type of login ID (must send the value "empresa")
    - __response_type__: Type of response ID (must send "code")
    - __redirect_uri__: URI that will be redirected when login action succeeds or fails

    __Exemple:__
    ```
    https://apigateway.vagas.com.br/oauth/authorize?response_type=code&client_id=some_application_id&login_type=empresa&redirect_uri=http%3A%2F%2Flocalhost%2Foauth%2Fcode_callback
    ```

    The user will authenticate with their credentials and authorize the use of their information
    by the remote service.

    When the user accepts the authorization, the Vagas API server will redirect back
    to the remote service using the address indicated by the redirect_uri parameter
    with an authorization code.

    __Exemple:__
    ```
    http://localhost/oauth/code_callback?code=AixUbVTop239876
    ```

    In case of unauthorized request, the call will be to the same URI
    informed in the redirect_uri parameter with the error parameter.

    __Exemple:__
    ```
    http://localhost/oauth/code_callback?error=unauthorized-request
    ```

    Using the code returned above, the remote service must request
    an access token that will be used for all other requests.

    Making a new request via an HTTP POST to the route
    /oauth/token using the "application/x-www-form-urlencoded" format with the following parameters:

    - __code__: The authorization code (received in the previous request)
    - __grant_type__: Should have the value: "authorization_code"

    It must also be included in the request HEADER an attribute with the client\_id and client\_secret information concatenated
    by a colon (:) and encoded in Base64

    __Example:__

    - Having the client\_id equal to __"example"__ and a client\_secret equal to __"emi40QrBjUiPaVC2eGK5"__
    - Must be concatenated: __example:emi40QrBjUiPaVC2eGK5__
    - Applied Base64 on above value: __ZXhhbXBsZTplbWk0MFFyQmpVaVBhVkMyZUdLNQ==__
    - Included in the HEADER of the request: __Authorization: Basic ZXhhbXBsZTplbWk0MFFyQmpVaVBhVkMyZUdLNQ==__

    __Exemple Curl:__

    ```shell
    curl -XPOST https://apigateway.vagas.com.br/oauth/token \
        --header “Authorization: Basic ZXhhbXBsZTplbWk0MFFyQmpVaVBhVkMyZUdLNQ==” \
        --data “code=AixUbVTop239876&grant_type=authorization_code”
    ```

    __The return of the request, if successful will be:__
    ```json
     {
       "access_token": "asd23sde12e123sd",
       "expired_in": 2591999
     }
    ```

    For all other requests below, the __access\_token__ must be
    included in the request as a HEADER attribute in BEARER format

    Remembering that __access\_token__ has a time limit for use, the information returned
    in the key __expires\_in__ indicates the number of seconds that the token will expire from its generation date.

    __Example call using __access\_token__:__

    ```shell
    # Example value that must be included in the request HEADER:
    # Authorization: Bearer asd23sde12e123sd
    CURL example:
    curl -XGET <URL TBD>
         --header “Authorization: Bearer asd23sde12e123sd”
    ```

servers:
  - url: https://apigateway.vagas.com.br/v1

security:
  - OAuth2: []

tags:
  - name: VaaS
  - name: Lists
    description: Endpoints for retrieving the information required to create a job posting.

paths:
  /job-posting/vaas/{job_id}:
    post:
      tags: [VaaS]
      summary: Post Job
      operationId: postJobVaas
      description: |
        Endpoint used to publish job postings in the Vagas.com system within the VaaS context.

        The +cargo+, +descrição do anuncio+, and +outros requisitos do anúncio+ support a limited set of HTML tags for text formatting. The allowed HTML tags are listed below.

        +Allowed HTML Tags:+

        - span
        - br
        - p
        - ul
        - ol
        - li
        - b
        - i
        - u
        - strong
        - em
        - div
        - h1
        - h2
        - h3
        - h4
        - h5
        - h6
      parameters:
        - name: job_id
          in: path
          required: true
          description: |
            Hash identifier of the represented company (`represented_hash` in the original
            document). In this operation the segment identifies the company, not the job.
          schema: { type: string }
          example: abc123xyz
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: '#/components/schemas/VaasJobCreateParams' }
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema: { $ref: '#/components/schemas/Job' }

    patch:
      tags: [VaaS]
      summary: Update Job
      operationId: updateJobVaas
      description: |
        Endpoint used to partially update a job posting published within the VaaS context.

        Only the fields listed below can be updated through this endpoint.
        If a field that is not allowed for update is sent in the request, the API will return an error informing that the field is not editable.

        The +cargo+, +descricao+, and +outros_requisitos+ fields support a limited set of HTML tags for text formatting. The allowed HTML tags are listed below.

        +Allowed HTML Tags:+

        - span
        - br
        - p
        - ul
        - ol
        - li
        - b
        - i
        - u
        - strong
        - em
        - div
        - h1
        - h2
        - h3
        - h4
        - h5
        - h6
      parameters:
        - name: job_id
          in: path
          required: true
          description: Job identifier.
          schema: { type: integer }
          example: 2505124
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: '#/components/schemas/VaasJobUpdateParams' }
      responses:
        "200":
          description: OK

  /job-posting/vaas/{id}/{representado_hash_id}:
    patch:
      tags: [VaaS]
      summary: Update Represented Job Posting
      operationId: updateRepresentedJobVaas
      description: |
        Endpoint for partially updating a job posting published through VaaS
        on behalf of a represented company.

        Only fields allowed for update can be included in the request.
        If a field that is not editable is sent, the API will return a message
        informing the client that the field cannot be edited.
      parameters:
        - name: id
          in: path
          required: true
          description: Identifier of the job posting to be updated.
          schema: { type: integer }
          example: 123456
        - name: representado_hash_id
          in: path
          required: true
          description: Hash identifier of the represented company.
          schema: { type: string }
          example: abc123xyz
      requestBody:
        required: true
        content:
          application/json:
            schema: { $ref: '#/components/schemas/VaasJobUpdateParams' }
      responses:
        "200":
          description: OK

  /job-posting/vaas/{represented_hash}/{job_id}/suspend:
    patch:
      tags: [VaaS]
      summary: Suspend Job
      operationId: suspendJobVaas
      description: Endpoint for suspending a job posting published within the VaaS context.
      parameters:
        - $ref: '#/components/parameters/RepresentedHash'
        - name: job_id
          in: path
          required: true
          description: Job identifier.
          schema: { type: integer }
          example: 2505124
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema: { $ref: '#/components/schemas/Suspend' }

  /job-posting/presentations/{represented_hash}:
    get:
      tags: [Lists]
      summary: List Presentations
      operationId: listPresentationsVaas
      description: Presentations of the company of the authenticated user
      parameters:
        - $ref: '#/components/parameters/RepresentedHash'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Presentations' }

  /dominios/setores:
    get:
      tags: [Lists]
      summary: List Fields of Activity
      operationId: listFieldsOfActivityVaas
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Area' }

  /job-posting/benefits/{represented_hash}:
    get:
      tags: [Lists]
      summary: List Benefits
      operationId: listBenefitsVaas
      parameters:
        - $ref: '#/components/parameters/RepresentedHash'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Benefit' }

  /job-posting/partner_channels:
    get:
      tags: [Lists]
      summary: List Partner channels
      operationId: listPartnerChannelsVaas
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/PartnerChannels' }

  /dominios/paises/{pais_id}/estados/{estado_id}/cidades:
    get:
      tags: [Lists]
      summary: List Cities
      operationId: listCitiesVaas
      parameters:
        - name: pais_id
          in: path
          required: true
          description: Identificação do país
          schema: { type: integer }
          example: 999
        - name: estado_id
          in: path
          required: true
          description: Identificação do estado
          schema: { type: integer }
          example: 999
        - name: nome
          in: query
          required: false
          description: busca pelo nome da cidade
          schema: { type: string }
          example: Sao Paulo
        - name: nome_exato
          in: query
          required: false
          description: busca pelo nome exato da cidade
          schema: { type: boolean }
          example: true
        - name: descricao
          in: query
          required: false
          description: busca pela descrição da cidade
          schema: { type: string }
          example: Sao Paulo/SP/BR
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/City' }

  /job-posting/divisions/{represented_hash}:
    get:
      tags: [Lists]
      summary: List Company Divisions
      operationId: listCompanyDivisionsVaas
      parameters:
        - $ref: '#/components/parameters/RepresentedHash'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Divisions' }

  /dominios/paises/{pais_id}/estados:
    get:
      tags: [Lists]
      summary: List States
      operationId: listStatesVaas
      parameters:
        - name: pais_id
          in: path
          required: true
          description: Identificação do país
          schema: { type: integer }
          example: 999
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/StateResponse' }

  /job-posting/phases/{represented_hash}:
    get:
      tags: [Lists]
      summary: List Phases
      operationId: listPhasesVaas
      parameters:
        - $ref: '#/components/parameters/RepresentedHash'
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Phases' }

  /dominios/idiomas:
    get:
      tags: [Lists]
      summary: List Languages
      operationId: listLanguagesVaas
      parameters:
        - name: nome
          in: query
          required: false
          description: nome do idioma ou apenas o começo do nome
          schema: { type: string }
          example: Espanhol
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Language' }

  /dominios/modelos-locais-trabalho:
    get:
      tags: [Lists]
      summary: List Work model
      operationId: listWorkModelVaas
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/WorkLocation' }

  /dominios/niveis_de_escolaridade:
    get:
      tags: [Lists]
      summary: List Education Levels
      operationId: listEducationLevelsVaas
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/LevelOfSchooling' }

  /dominios/niveis_hierarquicos:
    get:
      tags: [Lists]
      summary: List Hierarchical Levels
      operationId: listHierarchicalLevelsVaas
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/HierarchicalLevels' }

  /dominios/paises:
    get:
      tags: [Lists]
      summary: List Countries
      operationId: listCountriesVaas
      parameters:
        - name: associacoes
          in: query
          required: false
          description: |
            Estende as possíveis associações de países: tipos de documento e estados. Por exemplo, se desejar obter os documentos associados a um país, o parâmetro associacoes[]=tipos_de_documento deve ser informado
          schema:
            type: array
            items: { type: string }
          example: ["tipos_de_documento", "estado"]
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/Country' }

  /dominios/modelos-contratuais:
    get:
      tags: [Lists]
      summary: List Contract Type
      operationId: listContractTypeVaas
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: { $ref: '#/components/schemas/ContractModel' }

components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: |
        See **Authentication** above. The __access\_token__ must be included in the request
        as a HEADER attribute in BEARER format.
      flows:
        clientCredentials:
          tokenUrl: https://apigateway.vagas.com.br/oauth/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://apigateway.vagas.com.br/oauth/authorize
          tokenUrl: https://apigateway.vagas.com.br/oauth/token
          scopes: {}

  parameters:
    RepresentedHash:
      name: represented_hash
      in: path
      required: true
      description: Hash identifier of the represented company.
      schema: { type: string }
      example: abc123xyz

  schemas:
    IdAndDescription:
      type: object
      properties:
        id: { type: integer, example: 999 }
        descricao: { type: string, example: Uma descrição }

    Area:
      $ref: '#/components/schemas/IdAndDescription'

    ContractModel:
      $ref: '#/components/schemas/IdAndDescription'

    HierarchicalLevels:
      $ref: '#/components/schemas/IdAndDescription'

    Benefit:
      type: object
      properties:
        id: { type: integer, example: 34 }
        descricao: { type: string, example: Horário flexível }
        permite_valor: { type: boolean, example: false }

    BenefitParams:
      type: object
      required: [id]
      properties:
        id: { type: integer, example: 2 }
        valor: { type: number, example: 80 }

    City:
      type: object
      properties:
        id: { type: integer, example: 1 }
        nome: { type: string, example: Sao Paulo }
        descricao: { type: string, example: Sao Paulo/SP/BR }
        latitude: { type: number, example: 1.5 }
        longitude: { type: number, example: 1.8 }
        lat: { type: number, example: 23.5475 }
        lng: { type: number, example: 46.63611111111111 }
        capital: { type: boolean, example: true }
        estado_id: { type: integer, example: 128 }
        pais_id: { type: integer, example: 128 }

    Country:
      type: object
      properties:
        id: { type: integer, example: 31 }
        sigla: { type: string, example: BR }
        nome: { type: string, example: Brazil }
        codigo_telefonico: { type: string, example: "55" }
        estados:
          type: array
          items: { $ref: '#/components/schemas/State' }
        tipos_de_documento:
          type: array
          items: { $ref: '#/components/schemas/DocumentType' }

    Divisions:
      type: object
      properties:
        id: { type: integer, example: 72590 }
        nome: { type: string, example: Recrutamento Interno }

    DocumentType:
      type: object
      properties:
        id: { type: integer, example: 38 }
        pais_id: { type: integer, example: 3 }
        nome: { type: string, example: Passport (AFG) }

    Form:
      type: object
      properties:
        id: { type: integer, example: 312065 }
        identificacao:
          type: string
          example: Teste de língua portuguesa - VAGAS - Resultado

    FormsResponse:
      type: object
      properties:
        total: { type: integer, example: 173 }
        total_paginas: { type: integer, example: 18 }
        pagina_atual: { type: integer, example: 5 }
        tamanho_pagina: { type: integer, example: 10 }
        fichas:
          type: array
          items: { $ref: '#/components/schemas/Form' }

    JobModel:
      allOf:
        - $ref: '#/components/schemas/IdAndDescription'
        - type: object
          properties:
            data_criacao: { type: string, example: "2021-09-03T16:58:48-03:00" }
            titulo: { type: string, example: Analista Suporte Teste Aline }

    JobModelResponse:
      type: object
      properties:
        total: { type: integer, example: 173 }
        total_paginas: { type: integer, example: 18 }
        pagina_atual: { type: integer, example: 5 }
        anuncios:
          type: array
          items: { $ref: '#/components/schemas/JobModel' }

    Language:
      type: object
      properties:
        id: { type: integer, example: 999 }
        nome: { type: string, example: nome de identificação, description: Name }

    LanguageParams:
      type: object
      required: [id, nivel_id]
      properties:
        id: { type: integer, example: 534 }
        nivel_id:
          type: integer
          enum: [1, 2, 3, 4, 5]
          example: 5
          description: |
            - 1 - não tem
            - 2 - Básico
            - 3 - Intermediário
            - 4 - Avançado
            - 5 - Fluente

    LevelOfSchooling:
      type: object
      properties:
        id: { type: integer, example: 999 }
        descricao: { type: string, example: Uma descrição }
        ordenacao: { type: integer, example: 25 }
        tipo: { type: string, example: ensino_medio }

    PartnerChannels:
      type: object
      properties:
        id: { type: integer, example: 1 }
        nome: { type: string, example: Linkedin }
        texto:
          type: string
          example: Fundado em 2003, o LinkedIn conecta os profissionais do mundo ...

    Phases:
      type: object
      properties:
        id: { type: integer, example: 1 }
        nome: { type: string, example: vaga teste }
        sigla: { type: string, example: VAGTEST }
        ordem: { type: integer, example: 2 }

    Presentations:
      type: object
      properties:
        id: { type: integer, example: 1 }
        nome_template: { type: string, example: Programa de Trainee }
        descricao: { type: string, example: Descrição da empresa }
        nome_empresa: { type: string, example: Empresa XPTO }
        confidencial: { type: boolean, example: false }

    State:
      type: object
      properties:
        id: { type: integer, example: 1 }
        nome: { type: string, example: Acre }
        pais_id: { type: integer, example: 31 }
        sigla_pais: { type: string, example: BR }

    StateResponse:
      type: object
      properties:
        id: { type: integer, example: 999 }
        nome: { type: string, example: nome de identificação, description: Name }
        descricao: { type: string, example: Uma descrição, description: Description }
        sigla: { type: string, example: SP, description: State acronym }

    WorkLocation:
      type: object
      properties:
        id: { type: integer, example: 1 }
        tipo: { type: string, example: home_office }
        nome: { type: string, example: 100% Home Office }

    Suspend:
      type: object
      properties:
        id: { type: integer, example: 27000 }
        suspend: { type: boolean, example: true }

    LocalAceitaCandidaturas:
      type: string
      enum: [somente_cidade, cidades_proximas, qualquer_cidade]
      example: cidades_proximas
      description: |
        Enum with the location which the application is accepted, apenas da cidade, cidades próximas or
        qualquer cidade. If the value is `somente_cidade`, accepts applicants who have registered the
        city of the job in the region of interest with the "Use my address" option turned on. If the value is
        `cidades_proximas`, accepts applicants who have registered the city of the job in the region of interest
        with the "Use my address" option turned on that are close to the city of the job (distance of up to 50 km).
        If the value is `qualquer_cidade`, accepts applicants who have registered the city of the job in the
        region of interest.

    VaasJobCreateParams:
      type: object
      required: [url_externa, cargo, beneficios, benefícios_txt, periodo_de_inscricao]
      properties:
        url_externa:
          type: string
          example: http://jobexternalurl.com/
          description: URL where the candidate will be redirected to complete the application process.
        fases_ids:
          type: array
          items: { type: integer }
          example: [999, 999]
          description: |
            Phases IDs the job will have, the ids can be obtained in the endpoint `/v1/job-posting/phases`.
            If not sent, the phase with `ordem` 1 registered in the company environment will be used.
        notificar:
          type: array
          items: { type: string }
          example: ["contato@empresa.com", "rh@email.com"]
          description: List of emails to send notification when the job is published
        cargo: { type: string, example: Engenheiro, description: Job title }
        cargo_exclusivo_pcd:
          type: boolean
          example: false
          description: Flag to mark if the job is for people with a disability only
        tipo_de_contratacao_id:
          type: integer
          example: 999
          description: |
            Contract type ID. can be obtained in the endpoint `/v1/dominios/modelos-contratuais`.
            If not sent, "CLT" (id 1) will be assumed.
        numero_de_posicoes:
          type: integer
          example: 1
          description: |
            Número de posições abertas para a vaga.
            If not sent, the value 1 will be assumed.
        idiomas:
          type: array
          items: { $ref: '#/components/schemas/LanguageParams' }
          description: |
            Required Languages for the job, they can be obtained in the endpoint
            `/v1/dominios/idiomas`
        beneficios:
          type: array
          items: { $ref: '#/components/schemas/BenefitParams' }
          description: |
            The IDs can be retrieved from the v1/job-posting/benefits endpoint. The same benefit must not be added more than once to the same job posting. If this field is sent, the “beneficios_txt” field must not be included in the request.
        benefícios_txt:
          type: string
          example: Benefits text
          description: |
            This field must be used to send benefits in free-text format. If this field is sent, the “benefits” field must not be included in the request.
        anuncio:
          type: object
          required: [descricao]
          properties:
            descricao: { type: string, example: Descrição da vaga }
            outros_requisitos: { type: string, example: Ter certificação em Inglês }
        salario:
          type: object
          required: [exibir_salario_no_anuncio]
          description: |
            If the whole object is not sent, "salary to be discussed" will be assumed
            (`tipo_moeda`: `BRL`, `faixa_salario_min`: `0.0`, `faixa_salario_max`: `0.0`,
            `exibir_salario_no_anuncio`: `false`). If sent, all 4 attributes below must be
            sent - sending only some of them returns an error.
          properties:
            tipo_moeda:
              type: string
              enum: [BRL, USD]
              example: BRL
              description: Currency of the salary, if `exibir_salario_no_anuncio` is true, this field is required
            faixa_salario_min:
              type: number
              example: 999
              description: Minimum value of the salary range, if `exibir_salario_no_anuncio` is true, this field is required
            faixa_salario_max:
              type: number
              example: 999
              description: Maximum vlaue of the salary range, if `exibir_salario_no_anuncio` is true, this field is required
            exibir_salario_no_anuncio:
              type: boolean
              example: true
              description: If false, the salary will be in agreement
        pre_requisitos:
          type: object
          required: [nivel_hierarquico_id, areas_de_atuacao_ids]
          properties:
            escolaridade_minima_id:
              type: integer
              example: 1
              description: |
                Minimum education level, the ID can be obtained in the endpoint
                `v1/dominios/niveis_de_escolaridade`
                If education is indifferent to the job, pass the value "-1".
                If not sent, "-1" (Indifferent) will be assumed.
            nivel_hierarquico_id:
              type: integer
              example: 3
              description: |
                Hierarchical level. The ID can be obtained in the endpoint
                `/v1/dominios/niveis_hierarquicos`
            aceitar_candidaturas_outras_areas:
              type: boolean
              example: true
              description: If true, the job will accept applications from other areas
            areas_de_atuacao_ids:
              type: array
              items: { type: integer }
              example: [4, 6, 10]
              description: |
                Fields of activity of the job. The IDs can be obtained in the endpoint
                `/v1/dominios/setores`
        atuacao:
          type: object
          required: [local_de_trabalho]
          properties:
            modelo_de_trabalho:
              type: integer
              example: 4
              description: |
                Work model. The ID can be obtained in the endpoint
                `/v1/dominios/modelos-locais-trabalho`.
                If not sent, "On-site" (id 1) will be assumed.
            aceitar_candidaturas:
              deprecated: true
              description: DEPRECATED
            local_aceita_candidaturas: { $ref: '#/components/schemas/LocalAceitaCandidaturas' }
            local_de_trabalho:
              type: object
              properties:
                pais_id:
                  type: integer
                  example: 999
                  description: |
                    Country ID
                    The ID can be obtained in the endpoint `/v1/dominios/paises/`.
                estado_id:
                  type: integer
                  example: 999
                  description: |
                    State ID
                    The ID can be obtained in the endpoint `/v1/dominios/paises/:pais_id/estados`.
                cidade_id:
                  type: integer
                  example: 999
                  description: |
                    City ID
                    The ID can be obtained in the endpoint `/v1/dominios/paises/:pais_id/estados/:estado_id/cidades`.
        sobre_a_empresa:
          type: object
          properties:
            anuncio_confidencial:
              type: boolean
              example: false
              description: |
                Confidential job
                If true, the company's name will not be displayed in the job description.
                If not sent, `false` will be assumed.
            apresentacao_da_empresa:
              type: integer
              example: 999
              description: |
                If not sent (and `anuncio_confidencial` is `false`), the presentation with the
                highest id registered in the company environment will be assumed.
        periodo_de_inscricao:
          type: object
          required: [data_inicio]
          properties:
            data_inicio:
              type: string
              example: "2024/01/01"
              description: Job start date. Must be set to the current date when the job is published.
            veiculacao_suspensa:
              type: boolean
              example: false
              description: Must always be false.
        acesso_restrito:
          type: object
          properties:
            vaga_restrita:
              type: boolean
              example: false
              description: Must always be false. If not sent, `false` will be assumed.
        canais_de_divulgacao:
          type: object
          properties:
            divisao_id:
              type: integer
              example: 999
              description: |
                Job division. The ID can be obtained in the endpoint `/v1/job-posting/divisions`.
                If not sent, the division with the lowest id registered in the company environment
                that is not of type Internal Recruitment will be assumed. If there is no eligible
                division, the request will return an error.
            parceiros_ids:
              type: array
              items: { type: integer }
              example: [999]
        vaga_inteligente:
          type: boolean
          example: true
          description: |
            If not sent, `true` will be assumed. The VaaS context does not allow explicitly
            sending the value `false`.

    VaasJobUpdateParams:
      type: object
      properties:
        url_externa:
          type: string
          example: http://jobexternalurl.com/
          description: URL where the candidate will be redirected to complete the application process.
        cargo: { type: string, example: Software Engineer, description: Job title. }
        cargo_exclusivo_pcd:
          type: boolean
          example: false
          description: Flag to mark if the job is exclusively for people with disabilities.
        tipo_de_contratacao_id:
          type: integer
          example: 999
          description: Contract type ID. It can be obtained from the endpoint `/v1/dominios/modelos-contratuais`.
        idiomas:
          type: array
          items: { $ref: '#/components/schemas/LanguageParams' }
          description: Required languages for the job.
        beneficios:
          type: array
          items: { $ref: '#/components/schemas/BenefitParams' }
          description: |
            Job benefits.

            The same benefit must not be added more than once to the same job posting.
            If this field is sent, the `beneficios_txt` field must not be included in the request.
        beneficios_txt:
          type: string
          example: Meal voucher, health insurance and transportation allowance
          description: |
            Free-text description of the job benefits.

            If this field is sent, the `beneficios` field must not be included in the request.
        anuncio:
          type: object
          properties:
            descricao: { type: string, example: Updated job description }
            outros_requisitos: { type: string, example: Additional requirements }
        salario:
          type: object
          properties:
            tipo_moeda:
              type: string
              enum: [BRL, USD]
              example: BRL
              description: Salary currency.
            faixa_salario_min:
              type: number
              example: 5000
              description: Minimum value of the salary range.
            faixa_salario_max:
              type: number
              example: 8000
              description: Maximum value of the salary range.
            exibir_salario_no_anuncio:
              type: boolean
              example: true
              description: Indicates whether the salary should be displayed in the job posting.
        pre_requisitos:
          type: object
          properties:
            escolaridade_minima_id:
              type: integer
              example: 1
              description: Minimum education level.
            nivel_hierarquico_id:
              type: integer
              example: 40
              description: Hierarchical level.
            aceitar_candidaturas_outras_areas:
              type: boolean
              example: false
              description: Indicates whether applications from other fields of activity are accepted.
            areas_de_atuacao_ids:
              type: array
              items: { type: integer }
              example: [4, 6, 10]
              description: Fields of activity IDs.
        atuacao:
          type: object
          properties:
            modelo_de_trabalho:
              type: integer
              example: 4
              description: Work model.
            local_aceita_candidaturas:
              type: string
              enum: [somente_cidade, cidades_proximas, qualquer_cidade]
              example: cidades_proximas
              description: Defines the location criteria for accepting applications.
            local_de_trabalho:
              type: object
              required: [pais_id, estado_id, cidade_id]
              properties:
                pais_id: { type: integer, example: 31, description: Country ID. }
                estado_id: { type: integer, example: 35, description: State ID. }
                cidade_id: { type: integer, example: 3550308, description: City ID. }
        sobre_a_empresa:
          type: object
          properties:
            apresentacao_da_empresa:
              type: integer
              example: 999
              description: Company presentation ID.
            anuncio_confidencial:
              type: boolean
              example: false
              description: Indicates whether the job posting is confidential.
        canais_de_divulgacao:
          type: object
          properties:
            divisao_id: { type: integer, example: 999, description: Job division ID. }
            parceiros_ids:
              type: array
              items: { type: integer }
              example: [999, 888]
              description: Partner channel IDs.

    Job:
      type: object
      properties:
        id: { type: integer, example: 2505124 }
        cargo_exclusivo_pcd: { type: boolean, example: false }
        cargo: { type: string, example: Analista de crédito }
        numero_de_posicoes: { type: integer, example: 2 }
        tipo_de_contratacao_id: { type: integer, example: 4 }
        funcionario_id: { type: integer, example: 17742 }
        empresa_id: { type: integer, example: 12702 }
        data_criacao: { type: string, example: "2023-05-03T11:13:34-03:00" }
        fases_ids:
          type: array
          items: { type: integer }
          example: [469731, 649710, 641396]
        canais_de_divulgacao:
          type: object
          properties:
            divisao_id: { type: integer, example: 67518 }
            parceiros_ids:
              type: array
              items: { type: integer }
              example: [11, 10]
        acesso_restrito:
          type: object
          properties:
            vaga_restrita: { type: boolean, example: false }
        sobre_a_empresa:
          type: object
          properties:
            anuncio_confidencial: { type: boolean, example: false }
            apresentacao_da_empresa: { type: integer, example: 139 }
        anuncio:
          type: object
          properties:
            descricao: { type: string, example: Descrição da Vaga }
            outros_requisitos: { type: string, example: sem comentários }
        periodo_de_inscricao:
          type: object
          properties:
            data_inicio: { type: string, example: "2023-05-03" }
            data_fim: { type: string, example: "2023-05-03T21:00:00-03:00" }
            veiculacao_suspensa: { type: boolean, example: false }
        salario:
          type: object
          properties:
            tipo_moeda:
              type: string
              enum: [BRL, USD]
              example: BRL
            faixa_salario_min: { type: number, example: 1500 }
            faixa_salario_max: { type: number, example: 2000 }
            exibir_salario_no_anuncio: { type: boolean, example: true }
        idiomas:
          type: array
          items:
            type: object
            properties:
              id: { type: integer, example: 20 }
              nivel_id: { type: integer, example: 2 }
        pre_requisitos:
          type: object
          properties:
            escolaridade_minima_id: { type: integer, example: 60 }
            nivel_hierarquico_id: { type: integer, example: 40 }
            areas_de_atuacao_ids:
              type: array
              items: { type: integer }
              example: [70, 1, 124]
        atuacao:
          type: object
          properties:
            modelo_de_trabalho: { type: integer, example: 2 }
            local_aceita_candidaturas:
              type: string
              enum: [somente_cidade, cidades_proximas, qualquer_cidade]
              example: somente_cidade
            local_de_trabalho:
              type: object
              properties:
                localizacao_completa: { type: string, example: "Angra dos Reis, RJ, Brasil" }
                pais: { type: string, example: Brasil }
                estado: { type: string, example: RJ }
                cidade: { type: string, example: Angra dos Reis }
                cidade_id: { type: integer, example: 60968 }
        fichas_gerenciais:
          type: array
          items:
            type: object
            properties:
              id: { type: integer, example: 23 }
        beneficios:
          type: array
          items:
            type: object
            properties:
              id: { type: integer, example: 2 }
              valor: { type: number, example: 34.5 }
        fichas:
          type: array
          items:
            type: object
            properties:
              id: { type: integer, example: 147637 }
              obrigratoria: { type: boolean, example: true }
        vaga_inteligente: { type: boolean, example: true }
