---
title: "Calculate Salary"
url: "https://developer.migros.ch/apis/hr25-compensation-api-0/versions/81e689e4-d95b-44d7-a80e-882b791b85b2/operations/calculate_salary_salary_calculate_post"
---

> Full API specification: https://developer.migros.ch/apis/hr25-compensation-api-0/versions/81e689e4-d95b-44d7-a80e-882b791b85b2.md

# Calculate Salary

`POST` `/migros/human-resources/hrsolcomp/v1/salary/calculate`

Operation ID: `calculate_salary_salary_calculate_post`

Launch salary calculation in the background. Returns immediately with a job_id. The calculation runs asynchronously and writes results directly to Dataverse. Use GET /salary/jobs/{job_id} to check progress.

## Query parameters

- `phase1_only` (boolean, optional) - If true, stop after Phase 1 and only update position_in_band and position_category fields. Phase 2 is skipped.

## Header parameters

- `authorization` (string, optional)

## Responses

- `200` - Job accepted
- `422` - Validation Error

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: HR25 Compensation API
  version: 0.1.0
servers:
  - url: https://hr25-comp.service.migros.cloud
paths:
  /migros/human-resources/hrsolcomp/v1/salary/calculate:
    post:
      description: |-
        Launch salary calculation in the background.

        Returns immediately with a job_id. The calculation runs asynchronously
        and writes results directly to Dataverse.
        Use GET /salary/jobs/{job_id} to check progress.
      operationId: calculate_salary_salary_calculate_post
      parameters:
        - description: If true, stop after Phase 1 and only update position_in_band and
            position_category fields. Phase 2 is skipped.
          in: query
          name: phase1_only
          required: false
          schema:
            default: false
            title: Phase1 Only
            type: boolean
        - in: header
          name: authorization
          required: false
          schema:
            title: Authorization
            type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/JobStatus"
          description: Job accepted
        "422":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
          description: Validation Error
      summary: Calculate Salary
      tags:
        - salary
      x-kong-route-defaults:
        strip_path: true
        tags:
          - hr25-comp
components:
  schemas:
    JobStatus:
      description: Status of an async salary calculation job
      properties:
        error:
          description: Error message if status is failed
          type: string
        job_id:
          description: Unique job identifier (UUID)
          type: string
        status:
          description: "Job status: running, completed, or failed"
          enum:
            - running
            - completed
            - failed
          type: string
      required:
        - job_id
        - status
      title: JobStatus
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
```
