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

# Delete Pay Items

> Batch soft-delete DRAFT CALLER pay-items by id and/or caller key: marks
them is_deleted (retained for audit, excluded from reads), not a hard delete.
Idempotent; refuses VALUED/STANDING/ADMIN_ENTRY and CONSUMED; per-target
outcome.



## OpenAPI

````yaml /api-reference/preview.json post /gb/organizations/{organization_id}/payruns/{payrun_id}/pay-items/delete
openapi: 3.1.0
info:
  title: Intermezzo Global Payroll
  summary: Global Payroll Platform
  description: Intermezzo's global payroll apis, organized by country
  version: '2026-08-18'
  x-logo:
    url: /static/icon.svg
servers: []
security: []
paths:
  /gb/organizations/{organization_id}/payruns/{payrun_id}/pay-items/delete:
    post:
      tags:
        - Great Britain
        - Pay Items
      summary: Delete Pay Items
      description: >-
        Batch soft-delete DRAFT CALLER pay-items by id and/or caller key: marks

        them is_deleted (retained for audit, excluded from reads), not a hard
        delete.

        Idempotent; refuses VALUED/STANDING/ADMIN_ENTRY and CONSUMED; per-target

        outcome.
      operationId: >-
        delete_pay_items_gb_organizations__organization_id__payruns__payrun_id__pay_items_delete_post
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
            title: Organization Id
        - name: payrun_id
          in: path
          required: true
          schema:
            type: string
            title: Payrun Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayItemDeleteRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayItemDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerToken: []
components:
  schemas:
    PayItemDeleteRequest:
      properties:
        ids:
          items:
            type: string
          type: array
          title: Ids
        targets:
          items:
            $ref: '#/components/schemas/PayItemDeleteTarget'
          type: array
          title: Targets
      additionalProperties: true
      type: object
      title: PayItemDeleteRequest
      description: 'Batch delete spanning employees: by engine id and/or by caller key.'
    PayItemDeleteResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/PayItemDeleteOutcome'
          type: array
          title: Results
      additionalProperties: true
      type: object
      required:
        - results
      title: PayItemDeleteResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PayItemDeleteTarget:
      properties:
        employee_id:
          type: string
          title: Employee Id
        wage_type_code:
          type: string
          title: Wage Type Code
        external_ref:
          type: string
          title: External Ref
      additionalProperties: true
      type: object
      required:
        - employee_id
        - wage_type_code
        - external_ref
      title: PayItemDeleteTarget
      description: A caller-key delete target, scoped to one line within a wage type.
    PayItemDeleteOutcome:
      properties:
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        target:
          anyOf:
            - $ref: '#/components/schemas/PayItemDeleteTarget'
            - type: 'null'
        status:
          $ref: '#/components/schemas/PayItemDeleteStatus'
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      additionalProperties: true
      type: object
      required:
        - status
      title: PayItemDeleteOutcome
      description: >-
        Per-target result. `id` is set for id targets, `target` for caller-key
        targets.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PayItemDeleteStatus:
      type: string
      enum:
        - DELETED
        - NOT_FOUND
        - REFUSED
      title: PayItemDeleteStatus
  securitySchemes:
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Get token from Auth0 and paste it here

````