Justworks Deductions API

Manage employee deductions — list deduction types, create one-time and recurring deductions, update existing deductions, and cancel deductions in bulk. The primary write surface of the Justworks Partner API. Each item carries a partner-supplied operation_id for idempotency.

Justworks Deductions API is one of 7 APIs that Justworks publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 1 machine-runnable capability that can be deployed as REST, MCP, or Agent Skill surfaces via Naftiko and 1 JSON Schema definition.

Tagged areas include Deductions, Payroll, and PEO. The published artifact set on APIs.io includes API documentation, an OpenAPI specification, 1 Naftiko capability spec, and 1 JSON Schema.

OpenAPI Specification

justworks-deductions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Justworks Deductions API
  description: |
    Manage employee deductions in the Justworks Partner API. Supports
    listing deduction types, creating one-time and recurring deductions,
    updating deductions, and cancelling deductions in bulk. This is the
    primary write surface of the Justworks Partner API.
  version: '2026-05-25'
  contact:
    name: Justworks Partner Support
    url: https://public-api.justworks.com/v1/docs

servers:
  - url: https://public-api.justworks.com
    description: Production Server

security:
  - OAuth2: []

tags:
  - name: Deductions
    description: List, create, update, and cancel employee deductions
  - name: Deduction Types
    description: Read access to Justworks deduction type catalog

paths:
  /v1/deduction-types:
    get:
      summary: Justworks List Deduction Types
      description: List Justworks-defined deduction type codes and descriptions.
      operationId: listDeductionTypes
      tags:
        - Deduction Types
      responses:
        '200':
          description: List of deduction types
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DeductionType'

  /v1/deductions:
    get:
      summary: Justworks List Deductions
      description: List deductions, optionally filtered by member, type, frequency, or description.
      operationId: listDeductions
      tags:
        - Deductions
      parameters:
        - name: deduction_type
          in: query
          schema:
            type: string
        - name: frequency
          in: query
          schema:
            type: string
            enum:
              - one_time
              - every_paycheck
        - name: description
          in: query
          schema:
            type: string
        - name: member_id
          in: query
          schema:
            type: string
        - name: cursor
          in: query
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
      responses:
        '200':
          description: A paginated list of deductions
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Deduction'
                  next_cursor:
                    type: string
                    nullable: true

    post:
      summary: Justworks Create Deductions
      description: Create one or more deductions in a single request. Each item carries a partner-supplied operation_id for idempotency.
      operationId: createDeductions
      tags:
        - Deductions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/DeductionCreate'
      responses:
        '200':
          description: Per-item create result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeductionWriteResult'

    put:
      summary: Justworks Update Deductions
      description: Update one or more existing deductions by deduction_id.
      operationId: updateDeductions
      tags:
        - Deductions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    $ref: '#/components/schemas/DeductionUpdate'
      responses:
        '200':
          description: Per-item update result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeductionWriteResult'

  /v1/deductions/cancel:
    patch:
      summary: Justworks Cancel Deductions
      description: Cancel one or more deductions by id.
      operationId: cancelDeductions
      tags:
        - Deductions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deduction_ids:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Per-item cancel result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeductionWriteResult'

components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://secure.justworks.com/oauth/authorize
          tokenUrl: https://public-api.justworks.com/oauth/token
          refreshUrl: https://public-api.justworks.com/oauth/token
          scopes:
            deductions:read: Read deductions
            deductions:write: Create, update, and cancel deductions

  schemas:
    DeductionType:
      type: object
      properties:
        code:
          type: string
        description:
          type: string

    Deduction:
      type: object
      properties:
        id:
          type: string
        member_id:
          type: string
        amount_type:
          type: string
        amount:
          type: integer
        currency:
          type: string
        deduction_type_code:
          type: string
        description:
          type: string
        end_date:
          type: string
          format: date
          nullable: true
        frequency:
          type: string
          enum:
            - one_time
            - every_paycheck
        start_date:
          type: string
          format: date

    DeductionCreate:
      type: object
      required:
        - member_id
        - operation_id
        - amount_type
        - amount
        - currency
        - deduction_type_code
        - frequency
        - start_date
      properties:
        member_id:
          type: string
        operation_id:
          type: string
          description: Partner-supplied idempotency key for this row
        amount_type:
          type: string
        amount:
          type: integer
        currency:
          type: string
        deduction_type_code:
          type: string
        description:
          type: string
        end_date:
          type: string
          format: date
          nullable: true
        frequency:
          type: string
          enum:
            - one_time
            - every_paycheck
        start_date:
          type: string
          format: date

    DeductionUpdate:
      type: object
      required:
        - deduction_id
      properties:
        deduction_id:
          type: string
        amount_type:
          type: string
        amount:
          type: integer
        currency:
          type: string
        deduction_type_code:
          type: string
        description:
          type: string
        end_date:
          type: string
          format: date
          nullable: true
        frequency:
          type: string
          enum:
            - one_time
            - every_paycheck
        start_date:
          type: string
          format: date

    DeductionWriteResult:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              deduction_id:
                type: string
              member_id:
                type: string
              operation_id:
                type: string
              error_message:
                type: string
                nullable: true
              success:
                type: boolean