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

# cancelPayrollSubmission

> The `cancelPayrollSubmission` API is used to cancel a previously submitted payroll and return it to an editable state.

### When to use:
- When there are last minute changes to a payroll that has already been submitted
- When a payroll has been submitted but needs to be moved to another day

### Notes:
- payPeriodStatus becomes `Cancelled` after using this API
- Edits can be made before 12:00 PM EST (noon) on the deadlineToRunPayroll to ensure payroll is still disbursed on time
- If edits are made after this time the payroll will be delayed. For more information see the `Payroll Processing` guide.



## OpenAPI

````yaml post /payroll/cancelPayrollSubmission
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /payroll/cancelPayrollSubmission:
    post:
      tags: []
      summary: cancelPayrollSubmission
      description: >-
        The `cancelPayrollSubmission` API is used to cancel a previously
        submitted payroll and return it to an editable state.


        ### When to use:

        - When there are last minute changes to a payroll that has already been
        submitted

        - When a payroll has been submitted but needs to be moved to another day


        ### Notes:

        - payPeriodStatus becomes `Cancelled` after using this API

        - Edits can be made before 12:00 PM EST (noon) on the
        deadlineToRunPayroll to ensure payroll is still disbursed on time

        - If edits are made after this time the payroll will be delayed. For
        more information see the `Payroll Processing` guide.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                companyId:
                  type: string
                payPeriodId:
                  type: string
              required:
                - method
                - companyId
                - payPeriodId
            example:
              method: cancelPayrollSubmission
              companyId: 3A08507F-E78B-4ABF-98D8-87D382E7CE14
              payPeriodId: 3C068DE4-038F-4874-B99B-4AFD7CB39351
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  payPeriod:
                    type: object
                    properties:
                      payPeriodId:
                        type: string
                      message:
                        type: string
                    required:
                      - payPeriodId
                      - message
                required:
                  - payPeriod
              example:
                payPeriod:
                  payPeriodId: DEE97E29-BF4A-40D1-9324-11D70BE38582
                  message: >-
                    Payroll submission has been cancelled successfully. You can
                    now make changes and resubmit before the deadline.
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                required:
                  - error
              example:
                error:
                  code: 400
                  message: invalid payPeriodId
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````