> This page is for version Latest Version (default).
> For other versions, use one of these documentation indexes:
> - Latest Version (default): https://paylocity-develop.ferndocs.com/payroll/latest-version/llms.txt
> - v2026-02-17: https://paylocity-develop.ferndocs.com/payroll/v-2026-02-17/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://paylocity-develop.ferndocs.com/payroll/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://paylocity-develop.ferndocs.com/payroll/_mcp/server.

# Create Employee Deduction

POST https://api.paylocity.com/apiHub/payroll/v1/companies/{companyId}/employees/{employeeId}/deductions
Content-Type: application/json

**Summary Description**

 This function will allow the API user to create a new deduction on the employee record.
Garnishments cannot be created using the Deduction endpoints.

Reference: https://paylocity-develop.ferndocs.com/payroll/api-reference/paylocity-ap-is/pay-setup-recurring-deductions/create-employee-deduction

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `companyId` (string, required)
- `employeeId` (string, required)

## Response

### 200

Successful response

## Examples

**Request**

```json
{
  "effectiveFrom": "<dateTime>",
  "effectiveTo": "<dateTime>",
  "calculationCode": "<string>",
  "rate": "<double>",
  "frequency": "<string>",
  "agency": "<string>",
  "arrear": "<double>",
  "miscellaneousInfo": "<string>",
  "note": "<string>",
  "selfInsured": "<boolean>",
  "priority": "<integer>",
  "loan401K": {
    "loanNumber": "<string>",
    "issueDate": "<dateTime>",
    "firstPaymentDate": "<dateTime>",
    "ea59": {}
  },
  "costCenters": [
    {
      "level": "<integer>",
      "code": "<string>",
      "commodo4f0": {},
      "ea6": {},
      "sed_9e8": {},
      "esse9": {}
    },
    {
      "level": "<integer>",
      "code": "<string>",
      "amete": {}
    }
  ],
  "limits": {
    "goal": "<double>",
    "paidToDate": "<double>",
    "payPeriodMinimum": "<double>",
    "payPeriodMaximum": "<double>",
    "annualMaximum": "<double>"
  },
  "code": "<string>"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions"

payload = {
    "effectiveFrom": "<dateTime>",
    "effectiveTo": "<dateTime>",
    "calculationCode": "<string>",
    "rate": "<double>",
    "frequency": "<string>",
    "agency": "<string>",
    "arrear": "<double>",
    "miscellaneousInfo": "<string>",
    "note": "<string>",
    "selfInsured": "<boolean>",
    "priority": "<integer>",
    "loan401K": {
        "loanNumber": "<string>",
        "issueDate": "<dateTime>",
        "firstPaymentDate": "<dateTime>",
        "ea59": {}
    },
    "costCenters": [
        {
            "level": "<integer>",
            "code": "<string>",
            "commodo4f0": {},
            "ea6": {},
            "sed_9e8": {},
            "esse9": {}
        },
        {
            "level": "<integer>",
            "code": "<string>",
            "amete": {}
        }
    ],
    "limits": {
        "goal": "<double>",
        "paidToDate": "<double>",
        "payPeriodMinimum": "<double>",
        "payPeriodMaximum": "<double>",
        "annualMaximum": "<double>"
    },
    "code": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"effectiveFrom":"<dateTime>","effectiveTo":"<dateTime>","calculationCode":"<string>","rate":"<double>","frequency":"<string>","agency":"<string>","arrear":"<double>","miscellaneousInfo":"<string>","note":"<string>","selfInsured":"<boolean>","priority":"<integer>","loan401K":{"loanNumber":"<string>","issueDate":"<dateTime>","firstPaymentDate":"<dateTime>","ea59":{}},"costCenters":[{"level":"<integer>","code":"<string>","commodo4f0":{},"ea6":{},"sed_9e8":{},"esse9":{}},{"level":"<integer>","code":"<string>","amete":{}}],"limits":{"goal":"<double>","paidToDate":"<double>","payPeriodMinimum":"<double>","payPeriodMaximum":"<double>","annualMaximum":"<double>"},"code":"<string>"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions"

	payload := strings.NewReader("{\n  \"effectiveFrom\": \"<dateTime>\",\n  \"effectiveTo\": \"<dateTime>\",\n  \"calculationCode\": \"<string>\",\n  \"rate\": \"<double>\",\n  \"frequency\": \"<string>\",\n  \"agency\": \"<string>\",\n  \"arrear\": \"<double>\",\n  \"miscellaneousInfo\": \"<string>\",\n  \"note\": \"<string>\",\n  \"selfInsured\": \"<boolean>\",\n  \"priority\": \"<integer>\",\n  \"loan401K\": {\n    \"loanNumber\": \"<string>\",\n    \"issueDate\": \"<dateTime>\",\n    \"firstPaymentDate\": \"<dateTime>\",\n    \"ea59\": {}\n  },\n  \"costCenters\": [\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"commodo4f0\": {},\n      \"ea6\": {},\n      \"sed_9e8\": {},\n      \"esse9\": {}\n    },\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"amete\": {}\n    }\n  ],\n  \"limits\": {\n    \"goal\": \"<double>\",\n    \"paidToDate\": \"<double>\",\n    \"payPeriodMinimum\": \"<double>\",\n    \"payPeriodMaximum\": \"<double>\",\n    \"annualMaximum\": \"<double>\"\n  },\n  \"code\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"effectiveFrom\": \"<dateTime>\",\n  \"effectiveTo\": \"<dateTime>\",\n  \"calculationCode\": \"<string>\",\n  \"rate\": \"<double>\",\n  \"frequency\": \"<string>\",\n  \"agency\": \"<string>\",\n  \"arrear\": \"<double>\",\n  \"miscellaneousInfo\": \"<string>\",\n  \"note\": \"<string>\",\n  \"selfInsured\": \"<boolean>\",\n  \"priority\": \"<integer>\",\n  \"loan401K\": {\n    \"loanNumber\": \"<string>\",\n    \"issueDate\": \"<dateTime>\",\n    \"firstPaymentDate\": \"<dateTime>\",\n    \"ea59\": {}\n  },\n  \"costCenters\": [\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"commodo4f0\": {},\n      \"ea6\": {},\n      \"sed_9e8\": {},\n      \"esse9\": {}\n    },\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"amete\": {}\n    }\n  ],\n  \"limits\": {\n    \"goal\": \"<double>\",\n    \"paidToDate\": \"<double>\",\n    \"payPeriodMinimum\": \"<double>\",\n    \"payPeriodMaximum\": \"<double>\",\n    \"annualMaximum\": \"<double>\"\n  },\n  \"code\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"effectiveFrom\": \"<dateTime>\",\n  \"effectiveTo\": \"<dateTime>\",\n  \"calculationCode\": \"<string>\",\n  \"rate\": \"<double>\",\n  \"frequency\": \"<string>\",\n  \"agency\": \"<string>\",\n  \"arrear\": \"<double>\",\n  \"miscellaneousInfo\": \"<string>\",\n  \"note\": \"<string>\",\n  \"selfInsured\": \"<boolean>\",\n  \"priority\": \"<integer>\",\n  \"loan401K\": {\n    \"loanNumber\": \"<string>\",\n    \"issueDate\": \"<dateTime>\",\n    \"firstPaymentDate\": \"<dateTime>\",\n    \"ea59\": {}\n  },\n  \"costCenters\": [\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"commodo4f0\": {},\n      \"ea6\": {},\n      \"sed_9e8\": {},\n      \"esse9\": {}\n    },\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"amete\": {}\n    }\n  ],\n  \"limits\": {\n    \"goal\": \"<double>\",\n    \"paidToDate\": \"<double>\",\n    \"payPeriodMinimum\": \"<double>\",\n    \"payPeriodMaximum\": \"<double>\",\n    \"annualMaximum\": \"<double>\"\n  },\n  \"code\": \"<string>\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions', [
  'body' => '{
  "effectiveFrom": "<dateTime>",
  "effectiveTo": "<dateTime>",
  "calculationCode": "<string>",
  "rate": "<double>",
  "frequency": "<string>",
  "agency": "<string>",
  "arrear": "<double>",
  "miscellaneousInfo": "<string>",
  "note": "<string>",
  "selfInsured": "<boolean>",
  "priority": "<integer>",
  "loan401K": {
    "loanNumber": "<string>",
    "issueDate": "<dateTime>",
    "firstPaymentDate": "<dateTime>",
    "ea59": {}
  },
  "costCenters": [
    {
      "level": "<integer>",
      "code": "<string>",
      "commodo4f0": {},
      "ea6": {},
      "sed_9e8": {},
      "esse9": {}
    },
    {
      "level": "<integer>",
      "code": "<string>",
      "amete": {}
    }
  ],
  "limits": {
    "goal": "<double>",
    "paidToDate": "<double>",
    "payPeriodMinimum": "<double>",
    "payPeriodMaximum": "<double>",
    "annualMaximum": "<double>"
  },
  "code": "<string>"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"effectiveFrom\": \"<dateTime>\",\n  \"effectiveTo\": \"<dateTime>\",\n  \"calculationCode\": \"<string>\",\n  \"rate\": \"<double>\",\n  \"frequency\": \"<string>\",\n  \"agency\": \"<string>\",\n  \"arrear\": \"<double>\",\n  \"miscellaneousInfo\": \"<string>\",\n  \"note\": \"<string>\",\n  \"selfInsured\": \"<boolean>\",\n  \"priority\": \"<integer>\",\n  \"loan401K\": {\n    \"loanNumber\": \"<string>\",\n    \"issueDate\": \"<dateTime>\",\n    \"firstPaymentDate\": \"<dateTime>\",\n    \"ea59\": {}\n  },\n  \"costCenters\": [\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"commodo4f0\": {},\n      \"ea6\": {},\n      \"sed_9e8\": {},\n      \"esse9\": {}\n    },\n    {\n      \"level\": \"<integer>\",\n      \"code\": \"<string>\",\n      \"amete\": {}\n    }\n  ],\n  \"limits\": {\n    \"goal\": \"<double>\",\n    \"paidToDate\": \"<double>\",\n    \"payPeriodMinimum\": \"<double>\",\n    \"payPeriodMaximum\": \"<double>\",\n    \"annualMaximum\": \"<double>\"\n  },\n  \"code\": \"<string>\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "effectiveFrom": "<dateTime>",
  "effectiveTo": "<dateTime>",
  "calculationCode": "<string>",
  "rate": "<double>",
  "frequency": "<string>",
  "agency": "<string>",
  "arrear": "<double>",
  "miscellaneousInfo": "<string>",
  "note": "<string>",
  "selfInsured": "<boolean>",
  "priority": "<integer>",
  "loan401K": [
    "loanNumber": "<string>",
    "issueDate": "<dateTime>",
    "firstPaymentDate": "<dateTime>",
    "ea59": []
  ],
  "costCenters": [
    [
      "level": "<integer>",
      "code": "<string>",
      "commodo4f0": [],
      "ea6": [],
      "sed_9e8": [],
      "esse9": []
    ],
    [
      "level": "<integer>",
      "code": "<string>",
      "amete": []
    ]
  ],
  "limits": [
    "goal": "<double>",
    "paidToDate": "<double>",
    "payPeriodMinimum": "<double>",
    "payPeriodMaximum": "<double>",
    "annualMaximum": "<double>"
  ],
  "code": "<string>"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.paylocity.com/apiHub/payroll/v1/companies/companyId/employees/employeeId/deductions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```