---
updatedAt: 2026-04-27T15:52:51.000Z
agentTools:
  siteIndex: https://developer.paylocity.com/llms.txt
  projectIndex: https://developer.paylocity.com/integrations/llms.txt
---

# Upsert Deduction

Upsert Deduction API sends new or updated employee deduction information directly to Paylocity Payroll/HR solution.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "WebLink API",
    "description": "For documentation about this API, please visit https://developer.paylocity.com/integrations/reference/weblink-overview",
    "contact": {
      "email": "webservices@paylocity.com"
    },
    "version": "v2"
  },
  "servers": [
    {
      "url": "https://dc1demogw.paylocity.com/api"
    }
  ],
  "paths": {
    "/v1/deduction": {
      "post": {
        "tags": [
          "Deduction"
        ],
        "summary": "Upsert Deduction",
        "description": "Upsert Deduction API sends new or updated employee deduction information directly to Paylocity Payroll/HR solution.",
        "x-explorer-enabled": false,
        "operationId": "deduction",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Bearer + JWT",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Deduction",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "deduction": {
                    "$ref": "#/components/schemas/addUpdateDeduction"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successfully processed",
            "content": {}
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/errors"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {}
          },
          "500": {
            "description": "Internal Server Error",
            "content": {}
          }
        },
        "security": [
          {
            "paylocity_auth": [
              "WebLinkAPI"
            ]
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "errors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "Path": {
              "type": "string",
              "description": "Path where error occured."
            },
            "field": {
              "type": "string",
              "description": "The name of the field, or property in the request message that contains an error."
            },
            "message": {
              "type": "string",
              "description": "A message describing error."
            },
            "options": {
              "type": "array",
              "description": "A list of options associated with this error. These options may indicate valid values for the field, or property that contains an error.",
              "items": {
                "type": "object",
                "description": "An option associated with this error",
                "additionalProperties": false
              }
            }
          }
        }
      },
      "addUpdateDeduction": {
        "type": "object",
        "properties": {
          "agency": {
            "type": "string",
            "description": "Used to produce third-party checks for a specific agency. Must match Company setup.<br  />Max length: 5"
          },
          "annualMaximum": {
            "type": "number",
            "description": "Year to Date dollar amount not to be exceeded for a deduction in the calendar year. <br  />Decimal(12,2)"
          },
          "calcCode": {
            "type": "string",
            "description": "Defines how deductions are calculated. Common values are *% (percentage of gross), flat (flat dollar amount)*. Defaulted to the Company setup calcCode for deduction. <br  />Max length: 15"
          },
          "caseNo": {
            "type": "string",
            "description": "Child Support Case Identifier number, case number or court order number.<br  />Max length: 20"
          },
          "companyNumber": {
            "type": "string",
            "description": "Paylocity assigned company number. <br  />Max length: 9"
          },
          "costCenter1": {
            "type": "string",
            "description": "Cost Center associated with deduction. Must match Company setup.<br  /> Max length: 10"
          },
          "costCenter2": {
            "type": "string",
            "description": "Cost Center associated with deduction. Must match Company setup.<br  /> Max length: 10"
          },
          "costCenter3": {
            "type": "string",
            "description": "Cost Center associated with deduction. Must match Company setup.<br  /> Max length: 10"
          },
          "dcode": {
            "type": "string",
            "description": "Deduction code. Must match Company setup. <br  />Max length: 5"
          },
          "effectiveDate": {
            "type": "string",
            "description": "Date deduction or benefit is active. Defaulted to run date or check date based on Company setup. Common formats are MM-DD-CCYY, CCYY-MM-DD",
            "format": "date"
          },
          "employeeId": {
            "type": "string",
            "description": "Either employee ID or employee SSN is required.<br  /> Max length: 10"
          },
          "endDate": {
            "type": "string",
            "description": "Stop date of a deduction or benefit. Common formats are MM-DD-CCYY, CCYY-MM-DD.",
            "format": "date"
          },
          "fipsCode": {
            "type": "string",
            "description": "Child support Federal Information Process Standard (FIPS) code. <br  />Max length: 7"
          },
          "frequency": {
            "type": "string",
            "description": "Needed if deduction is applied differently from the payroll frequency (one time deduction for example).<br  /> Max length: 5"
          },
          "goal": {
            "type": "number",
            "description": "Dollar amount. The employee deduction will stop when the goal amount is reached.<br  /> Decimal(12,2)"
          },
          "isSelfInsuredPlan": {
            "type": "boolean",
            "description": "Used for ACA. If not entered, defaulted to Company deduction setup"
          },
          "loanFirstPaymentDate401K": {
            "type": "string",
            "description": "401K loan first payment date. Common formats are MM-DD-CCYY, CCYY-MM-DD",
            "format": "date"
          },
          "loanIssueDate401K": {
            "type": "string",
            "description": "401K loan issue date. Common formats are MM-DD-CCYY, CCYY-MM-DD",
            "format": "date"
          },
          "loanNumber": {
            "type": "string",
            "description": "401K Loan number, required for 401K Loan deduction types. <br  /> Max length: 50"
          },
          "maximum": {
            "type": "number",
            "description": "Maximum amount of the deduction on a single paycheck. <br  /> Decimal(12,2)"
          },
          "medicalSupport": {
            "type": "boolean",
            "description": "Indicates if the employee qualifies for medical benefits that can be used to cover the child"
          },
          "minimum": {
            "type": "number",
            "description": "Minimum amount of the deduction on a single paycheck. <br  /> Decimal(12,2)"
          },
          "miscInfo": {
            "type": "string",
            "description": "Information to print on the check stub if agency check is set up for this deduction. <br  />Max length: 50"
          },
          "paidTowardsGoal": {
            "type": "number",
            "description": "Amount already paid toward goal.<br  /> Decimal(12,2)"
          },
          "priority": {
            "type": "integer",
            "description": "Priority of a deduction within the deduction category. Common values are *0,1,2. <br  /> Max length: 2"
          },
          "rate": {
            "type": "number",
            "description": "Value to match the calcCode (percentage or amount). For example if calcCode = %, enter 10.00 to indicate 10%. <br  /> Decimal(12,2)"
          },
          "reportTerminated": {
            "type": "boolean",
            "description": "Indicates whether agency needs to be reported on terminated employee"
          },
          "ssn": {
            "type": "string",
            "description": "Either employee ID or employee SSN is required.<br  /> Max length: 11"
          },
          "startDate": {
            "type": "string",
            "description": "Start date of a deduction based on payroll calendar. Common formats are MM-DD-CCYY, CCYY-MM-DD",
            "format": "date"
          },
          "stateAbbrev": {
            "type": "string",
            "description": "State for child support.<br  /> Max length: 2"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "paylocity_auth": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://api.paylocity.com/IdentityServer/connect/token",
            "scopes": {
              "WebLinkAPI": "Web Link Api"
            }
          }
        }
      }
    }
  },
  "x-original-swagger-version": "2.0"
}
```