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.

OpenAPI Specification

justworks-deductions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Justworks Company Deductions API
  description: 'Read company-level data from the Justworks Partner API including

    company identity, bank account on file, verified business information,

    custom field definitions, and operating jurisdictions.

    '
  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
paths:
  /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:
  schemas:
    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
    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
    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
    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
  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:
            company.basic:read: Read basic company data
            company.detail:read: Read detailed company data
            company.bank_account:read: Read company bank account on file