Jobs Public API - Compensation required validation and 422 error documentation

Description

The OpenAPI specification was updated to document a 422 Unprocessable Entity response with compensation-related error codes for requests that have issues with compensation information based on company configuration.

Addition in the OpenAPI specification for affected paths:

             application/json:
               schema:
                 $ref: '#/components/schemas/ErrorResponse'
+        '422':
+          description: |
+            with codes
+            * **COMPENSATION_REQUIRED** – compensation is required by company configuration but is missing or incomplete.
+            * **COMPENSATION_HIDDEN** – compensation should not be provided when company configuration requires it to be hidden.
+            * **COMPENSATION_INVALID_CURRENCY** – the currency code provided is invalid or not supported.
+          content:
+            application/json:
+              schema:
+                $ref: '#/components/schemas/ErrorResponse'

This 422 response is documented for the following endpoints:

  • Postings
    • POST /jobs/{id}/jobads/{jobAdId}/postings – Publish a job ad
  • Publication
    • POST /jobs/{id}/publication – Publish default job ad

Impact

The change is backwards compatible unless an admin changes salary transparency or compensation display configuration. When compensation is required by company configuration, clients that publish jobs or job ads without compensation will receive a 422 response with code COMPENSATION_REQUIRED. When compensation must be hidden, providing compensation will return COMPENSATION_HIDDEN. Invalid currency codes will return COMPENSATION_INVALID_CURRENCY. Valid payloads are unchanged.

References