---
updatedAt: 2026-06-08T15:30:39.000Z
agentTools:
  siteIndex: https://developer.paylocity.com/llms.txt
  projectIndex: https://developer.paylocity.com/integrations/llms.txt
---

# Update Employee Earning by resourceId

**Summary Description**

This function will allow the API user to update details for a particular earning code that occurs in the past/present/future.

# OpenAPI definition

```json
{
  "openapi": "3.0.4",
  "info": {
    "title": "Pay Setup API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "dc1demogwext.paylocity.com"
    }
  ],
  "paths": {
    "/apiHub/payroll/v1/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}/{resourceId}": {
      "put": {
        "tags": [
          "Recurring Earnings"
        ],
        "summary": "Update Employee Earning by resourceId",
        "description": "**Summary Description**\n\nThis function will allow the API user to update details for a particular earning code that occurs in the past/present/future.",
        "x-explorer-enabled": false,
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "The Paylocity Company Identifier. This is the unique value provided by Paylocity to each specific Payroll Entity.\r\n                **Allowable Values:**\r\n                9 char max",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "A12345"
          },
          {
            "name": "employeeId",
            "in": "path",
            "description": "A filter to use to limit results to a specific employee.\r\n                **Allowable Values:**\r\n                255 char max",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "earningCode",
            "in": "path",
            "description": "Earning Code",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceId",
            "in": "path",
            "description": "Resource ID of the record",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "A Payroll Earning Code is a specific classification used in payroll systems to categorize the different types of income an employee receives. These codes denote various earnings such as regular hours worked, overtime, bonuses, commissions, or holiday pay, among others. The purpose of these codes is to streamline the payroll process, making it easier to track, manage, and report different types of income. They are essential for accurate payroll calculations and compliance with tax and labor laws.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEarningDto"
              },
              "examples": {
                "Update Rate": {
                  "value": {
                    "rate": 50
                  }
                },
                "Update Amount and Dates": {
                  "value": {
                    "effectiveFrom": "2024-06-01T00:00:00",
                    "effectiveTo": "2024-12-31T00:00:00",
                    "amount": 3000
                  }
                },
                "Update Units and Rate": {
                  "value": {
                    "rate": 47.5,
                    "units": 20,
                    "calculationCode": "HOURLY",
                    "frequency": "PerPayPeriod"
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEarningDto"
              },
              "examples": {
                "Update Rate": {
                  "value": {
                    "rate": 50
                  }
                },
                "Update Amount and Dates": {
                  "value": {
                    "effectiveFrom": "2024-06-01T00:00:00",
                    "effectiveTo": "2024-12-31T00:00:00",
                    "amount": 3000
                  }
                },
                "Update Units and Rate": {
                  "value": {
                    "rate": 47.5,
                    "units": 20,
                    "calculationCode": "HOURLY",
                    "frequency": "PerPayPeriod"
                  }
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEarningDto"
              },
              "examples": {
                "Update Rate": {
                  "value": {
                    "rate": 50
                  }
                },
                "Update Amount and Dates": {
                  "value": {
                    "effectiveFrom": "2024-06-01T00:00:00",
                    "effectiveTo": "2024-12-31T00:00:00",
                    "amount": 3000
                  }
                },
                "Update Units and Rate": {
                  "value": {
                    "rate": 47.5,
                    "units": 20,
                    "calculationCode": "HOURLY",
                    "frequency": "PerPayPeriod"
                  }
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEarningDto"
              },
              "examples": {
                "Update Rate": {
                  "value": {
                    "rate": 50
                  }
                },
                "Update Amount and Dates": {
                  "value": {
                    "effectiveFrom": "2024-06-01T00:00:00",
                    "effectiveTo": "2024-12-31T00:00:00",
                    "amount": 3000
                  }
                },
                "Update Units and Rate": {
                  "value": {
                    "rate": 47.5,
                    "units": 20,
                    "calculationCode": "HOURLY",
                    "frequency": "PerPayPeriod"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CostCenterDto": {
        "type": "object",
        "properties": {
          "level": {
            "type": "integer",
            "description": "Cost center level (Levels are 1-3)",
            "format": "int32",
            "nullable": true
          },
          "code": {
            "type": "string",
            "description": "Cost Center Code associated with the Level. This must match a Paylocity Cost Center Code",
            "nullable": true
          }
        },
        "additionalProperties": {
          "type": "object",
          "nullable": true
        },
        "description": "Cost Centers are organizational units within a company. Typically clients will break out their employees using cost centers like divisions, location and department."
      },
      "CreateLimitsDto": {
        "type": "object",
        "properties": {
          "goal": {
            "type": "number",
            "description": "The Goal is the deduction/earning limit. When deductions/earnings have met the limit, the employee pay deductions/earnings will stop.\r\nFor payroll, this amount is the lifetime deduction/earning limit.\r\nFor benefits, this limit amount could be annual.",
            "format": "double",
            "nullable": true
          },
          "paidToDate": {
            "type": "number",
            "description": "Paid to Date tracks the amount paid toward the Goal. The Paid to Date amount will never be more than the Goal amount",
            "format": "double",
            "nullable": true
          },
          "payPeriodMinimum": {
            "type": "number",
            "description": "Minimum for the pay period",
            "format": "double",
            "nullable": true
          },
          "payPeriodMaximum": {
            "type": "number",
            "description": "Maximum for the pay period",
            "format": "double",
            "nullable": true
          },
          "annualMaximum": {
            "type": "number",
            "description": "Entering an amount in the Annual Maximum field will override the system setting, and you'll need to manually manage the maximum each year.\r\nLeave this field blank to keep the system setting.",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": {
          "type": "object",
          "nullable": true
        },
        "description": "Limits are used to control the amount of an earning or deduction"
      },
      "DistributionDto": {
        "type": "object",
        "properties": {
          "jobCode": {
            "type": "string",
            "description": "Job Code Allocation",
            "nullable": true
          },
          "costCenters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CostCenterDto"
            },
            "description": "An array of objects representing the Cost Centers",
            "nullable": true
          }
        },
        "additionalProperties": {
          "type": "object",
          "nullable": true
        },
        "description": "Labor Distribution is the term for the system categorizing (distributing) payroll data among Cost Centers and Job Codes"
      },
      "UpdateEarningDto": {
        "type": "object",
        "properties": {
          "effectiveFrom": {
            "type": "string",
            "description": "Effective Date of Earning",
            "format": "date-time",
            "nullable": true
          },
          "effectiveTo": {
            "type": "string",
            "description": "End Date of Earning",
            "format": "date-time",
            "nullable": true
          },
          "amount": {
            "type": "number",
            "description": "Amount of Earning",
            "format": "double",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "Earning Code Rate",
            "format": "double",
            "nullable": true
          },
          "units": {
            "type": "number",
            "description": "Hours or Units Worked",
            "format": "double",
            "nullable": true
          },
          "selfInsured": {
            "type": "boolean",
            "description": "Self Insured Flag",
            "nullable": true
          },
          "calculationCode": {
            "type": "string",
            "description": "Earning Calculation Code",
            "nullable": true
          },
          "frequency": {
            "type": "string",
            "description": "Frequency determines how often the earning Amount is applied in payroll",
            "nullable": true
          },
          "agency": {
            "type": "string",
            "description": "Agency Code",
            "nullable": true
          },
          "miscellaneousInfo": {
            "type": "string",
            "description": "Miscellaneous Info",
            "nullable": true
          },
          "rateCode": {
            "type": "string",
            "description": "Rate Code",
            "nullable": true
          },
          "distribution": {
            "$ref": "#/components/schemas/DistributionDto"
          },
          "limits": {
            "$ref": "#/components/schemas/CreateLimitsDto"
          }
        },
        "additionalProperties": {
          "type": "object",
          "nullable": true
        },
        "description": "A Payroll Earning Code is a specific classification used in payroll systems to categorize the different types of income an employee receives.\r\nThese codes denote various earnings such as regular hours worked, overtime, bonuses, commissions, or holiday pay, among others.\r\nThe purpose of these codes is to streamline the payroll process, making it easier to track, manage, and report different types of income.\r\nThey are essential for accurate payroll calculations and compliance with tax and labor laws."
      }
    }
  }
}
```