> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roostedhr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Payroll Group

> Updates an existing payroll group. All fields (name, group_rows, locations) are required in the request body.

<Note>
  This is a partial update endpoint — only include the fields you want to change. Omitted fields remain unchanged.
</Note>


## OpenAPI

````yaml api-reference/v01.12.00/openapi-v01.12.00.json PATCH /payroll-groups/{id}
openapi: 3.0.0
info:
  title: Roosted
  version: 0.1.12
  contact:
    name: Support
    url: https://support.roostedhr.com/support/home
    email: support@roostedhr.com
  description: |-
    Enterprise API

    Sandbox keys and Production keys are requested from support
servers:
  - url: https://api.roostedhr.com/api/1_12
  - url: https://sandbox.roostedhr.com/api/1_12
security:
  - X-API-KEY: []
tags:
  - name: Announcements
  - name: Areas
  - name: Clients
  - name: Company
  - name: Configuration
  - name: Events
  - name: Locations
  - name: Payroll Groups
  - name: Rate Cards
  - name: Shifts
  - name: Skillsets
  - name: Time Tracking
  - name: Wage Rules
  - name: Workers
paths:
  /payroll-groups/{id}:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Payroll Group ID
    patch:
      tags:
        - Payroll Groups
      summary: Edit Payroll Group
      description: >-
        Updates an existing payroll group. All fields (name, group_rows,
        locations) are required in the request body.
      operationId: patch-payroll-group
      requestBody:
        description: Fields to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayrollGroupUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayrollGroup'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Payroll group name is required:
                  value:
                    code: PYG-100
                    error: Payroll group name is required
                Locations must be an array:
                  value:
                    code: PYG-200
                    error: Locations must be an array
                Invalid location ID:
                  value:
                    code: PYG-200
                    error: Invalid location ID
                At least one skillset group row is required:
                  value:
                    code: PYG-400
                    error: At least one skillset group row is required
                Invalid skillset ID:
                  value:
                    code: PYG-500
                    error: Invalid skillset ID
                Invalid wage rule:
                  value:
                    code: PYG-600
                    error: Invalid wage rule
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Invalid or missing API key:
                  value:
                    code: ATH-100
                    error: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Insufficient permissions to manage payroll groups:
                  value:
                    code: PYG-1000
                    error: Insufficient permissions to manage payroll groups
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                Payroll group not found:
                  value:
                    code: PYG-300
                    error: Payroll group not found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  error:
                    type: string
                    description: Human-readable error message.
              examples:
                An unexpected error occurred:
                  value:
                    code: PYG-2000
                    error: An unexpected error occurred
components:
  schemas:
    PayrollGroupUpdateRequest:
      type: object
      description: Request body for updating an existing payroll group.
      required:
        - name
        - group_rows
        - locations
      properties:
        name:
          type: string
          description: Payroll group name
        group_rows:
          type: array
          items:
            type: array
            items:
              type: string
          description: Array of skillset groups. Each group is an array of skillset IDs.
        locations:
          type: array
          items:
            type: string
          description: Location IDs to associate with this payroll group
        payroll_item_id:
          type: string
          description: External payroll item identifier
        default_wage:
          type: number
          format: float
          nullable: true
          description: Default wage rate
        invoice_cost:
          type: string
          description: Invoice cost (accepts string for flexibility)
        wage_rules_id:
          type: string
          description: Associated wage rule identifier
    PayrollGroup:
      type: object
      description: >-
        A payroll group used to categorize shifts for payroll and invoicing
        purposes.
      properties:
        id:
          type: string
          description: Payroll group identifier
        name:
          type: string
          description: Payroll group name
        payroll_item_id:
          type: string
          nullable: true
          description: External payroll item identifier
        default_wage:
          type: number
          format: float
          nullable: true
          description: Default wage rate
        insert_date:
          type: string
          nullable: true
          description: Creation date
        invoice_cost:
          type: number
          format: float
          nullable: true
          description: Invoice cost rate
        wage_rules_id:
          type: string
          nullable: true
          description: Associated wage rule identifier
        group_rows:
          type: array
          items:
            type: string
          description: Skillset combination row IDs
        locations:
          type: array
          items:
            type: string
          description: Associated location IDs
  securitySchemes:
    X-API-KEY:
      name: X-API-KEY
      type: apiKey
      in: header

````