{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deputy/json-schema/deputy-employee-rate-get-employee-rate-by-contract-response-schema.json",
  "title": "EmployeeRateGetEmployeeRateByContractResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deputy-compliance-api-openapi.yml#/components/schemas/EmployeeRateGetEmployeeRateByContractResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "totalCount": {
      "type": "integer",
      "format": "int64"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/v2modelEmployeeRate"
      }
    }
  },
  "$defs": {
    "modelRateDetail": {
      "type": "object",
      "properties": {
        "agreementId": {
          "type": "integer",
          "format": "int64",
          "title": "The agreement id of the rate"
        },
        "contractId": {
          "type": "integer",
          "format": "int64",
          "title": "the contract the base rate belongs to"
        },
        "locationName": {
          "type": "string",
          "title": "Name of the location to which the rate belongs"
        },
        "areaRateId": {
          "type": "integer",
          "format": "int64",
          "title": "The area rate id of the rate. Only set when this is area rate"
        },
        "areaName": {
          "type": "string",
          "title": "The name of the area to which the rate belongs. Only set when this is area rate"
        },
        "areaId": {
          "type": "integer",
          "format": "int64",
          "title": "The area id (i.e. operationalUnitId). Only set when this is area rate"
        },
        "rate": {
          "type": "number",
          "format": "double",
          "title": "The rate value.\nWhen retrieving rate details, if was main rate, then this is `agreement.base_rate`, or basePayRule.hourlyRate as fallback; If was area rate, then this is `area_rate.base_rate`\nWhen updating rate details, this is the new rate value"
        }
      },
      "title": "Rate represents the details of the employee rate, either main rate or area rate, and related location and area"
    },
    "v2modelEmployeeRate": {
      "type": "object",
      "properties": {
        "employeeId": {
          "type": "integer",
          "format": "int64"
        },
        "employeeName": {
          "type": "string"
        },
        "rates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/modelRateDetail"
          }
        }
      },
      "title": "EmployeeRate represents the rates of an employee linked to a specific contract, contains a list of rate details"
    }
  }
}