> ## Documentation Index
> Fetch the complete documentation index at: https://api.jobaffinity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Advance an application to its next step

> Moves the application, as the recruiter making the call, to `target_step_id` or to the deduced next step when omitted. Requires `expected_current_step_id`: a 409 answers when the application moved in the meantime, so two recruiters cannot silently race. END and operational steps are refused.



## OpenAPI

````yaml /api-reference/openapi.json post /application/{applicationid}/advance-step
openapi: 3.0.3
info:
  title: JobAffinity REST API
  version: '1.13'
  description: >
    JobAffinity REST API for managing jobs, candidates, applications, and
    recruitment processes.


    ## Authentication

    All endpoints require HTTP Basic Authentication.


    ## Versioning

    Current version: 1.13


    See `/restapi/changelog` for version history and changes.
  contact:
    name: JobAffinity API Support
servers:
  - url: https://jobaffinity.fr/restapi/v1
    description: REST API v1
  - url: https://jobaffinity.fr/restapi
    description: REST API root (for changelog)
security:
  - basicAuth: []
tags:
  - name: API Info
    description: API metadata and changelog
  - name: Account
    description: Authenticated user identity and organisation membership
  - name: Jobs
    description: Job listings and details
  - name: Candidates
    description: Candidate information
  - name: Applications
    description: Job applications
  - name: Processes
    description: Recruitment processes and steps
  - name: Notes
    description: Candidate notes
  - name: Templates
    description: Recorded email templates
  - name: Questionnaires
    description: Questionnaire answers
  - name: Webhooks
    description: Webhook tasks
  - name: Job Application Submission
    description: >-
      Submit candidate applications to a job posting via the apply URL provided
      in the job feed. The authentication token is embedded in the URL — no
      additional credentials are required.
paths:
  /application/{applicationid}/advance-step:
    post:
      tags:
        - Applications
      summary: Advance an application to its next step
      description: >-
        Moves the application, as the recruiter making the call, to
        `target_step_id` or to the deduced next step when omitted. Requires
        `expected_current_step_id`: a 409 answers when the application moved in
        the meantime, so two recruiters cannot silently race. END and
        operational steps are refused.
      operationId: advanceApplicationStep
      parameters:
        - name: applicationid
          in: path
          required: true
          description: Application ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - expected_current_step_id
              properties:
                expected_current_step_id:
                  type: integer
                  description: >-
                    The step the caller believes is current. A mismatch answers
                    409.
                target_step_id:
                  type: integer
                  description: Explicit step to move to. Omit to use the deduced next step.
                organisation_id:
                  type: integer
                  description: Optional organisation the read is narrowed to.
      responses:
        '200':
          description: Application moved
          content:
            application/json:
              schema:
                type: object
                properties:
                  _status:
                    type: string
                    enum:
                      - OK
                      - INVALID
                  application_id:
                    type: integer
                    description: ID of the application moved.
                  step_id:
                    type: integer
                    description: ID of the step the application is now on.
                  step_name:
                    type: string
                    description: Name of that step.
                  rank:
                    type: integer
                    description: Rank of that step.
        '400':
          description: Missing expected_current_step_id, or the caller is not a user
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Application or target step not found
        '409':
          description: >-
            The application moved in the meantime, has no current step, or the
            target step is an END or operational step
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      headers:
        WWW-Authenticate:
          schema:
            type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication with API credentials

````