> ## 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.

# updateTimeCardApprovals

> The `updateTimeCardApprovals` API moves timecards between the editable **new** status and **approved** so they can be synced to payroll

### What it does:
- Locks the complete time card when **isApproved: true** so the administrator or employee cannot add or update time entries
- Unlocks the time card when **isApproved: false** so last minyte edits can be made
- Blocks clock in and out for the employee if the timecard includes the current date

### Notes:
- Once time cards are approved they can be synced to payroll using the `syncTimeCardsToPayroll` API
- Time cards can be unapproved from both **synced** and **approved** status so they are once again editable and corrections can be made
- Approval status is determined by the`isApproved: true/false` fields



## OpenAPI

````yaml put /adminPortal/updateTimeCardApprovals
openapi: 3.1.0
info:
  title: Default module
  description: |
    Webhook events emitted when a company's KYB status is created or changes.

    Rollfi sends these requests to the webhook URL configured for the client.
    Consumers should return a successful 2xx response after accepting the event.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Admin Portal
  - name: TimeOff Admin
  - name: TimeTracking Admin
  - name: TimeOff User
  - name: TimeTracking User
  - name: TimeTracking Reports
  - name: TimeOff Reports
  - name: Pay Schedule Webhooks
  - name: Pay Period Webhooks
  - name: Employee Bank Account Webhooks
  - name: Employee KYC Webhooks
  - name: Company Bank Account Webhooks
  - name: Company Webhooks
  - name: Employee Status Webhooks
paths:
  /adminPortal/updateTimeCardApprovals:
    put:
      tags:
        - TimeTracking Admin
      summary: updateTimeCardApprovals
      description: >-
        The `updateTimeCardApprovals` API moves timecards between the editable
        **new** status and **approved** so they can be synced to payroll


        ### What it does:

        - Locks the complete time card when **isApproved: true** so the
        administrator or employee cannot add or update time entries

        - Unlocks the time card when **isApproved: false** so last minyte edits
        can be made

        - Blocks clock in and out for the employee if the timecard includes the
        current date


        ### Notes:

        - Once time cards are approved they can be synced to payroll using the
        `syncTimeCardsToPayroll` API

        - Time cards can be unapproved from both **synced** and **approved**
        status so they are once again editable and corrections can be made

        - Approval status is determined by the`isApproved: true/false` fields
      operationId: updateTimeCardApprovals
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                companyId:
                  type: string
                payPeriodId:
                  type: string
                timeCardIds:
                  type: array
                  items:
                    type: string
                isApproved:
                  type: boolean
              required:
                - method
                - companyId
                - payPeriodId
                - timeCardIds
                - isApproved
            example:
              method: updateTimeCardApprovals
              companyId: 5221FFCF-E84B-4690-B7DC-DE29D549096B
              payPeriodId: 3EAEC271-6C06-4E17-8C3B-1C6649D534D5
              timeCardIds:
                - 4DDB60ED-BC33-49FA-A589-E29FB6C4FD5C
              isApproved: true
      responses:
        '200':
          description: Time card approval statuses updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  timeCards:
                    type: array
                    items:
                      type: object
                      properties:
                        timeCardId:
                          type: string
                        userId:
                          type: string
                        status:
                          type: string
                        message:
                          type: string
                      required:
                        - timeCardId
                        - userId
                        - status
                        - message
                required:
                  - timeCards
              example:
                timeCards:
                  - timeCardId: 4DDB60ED-BC33-49FA-A589-E29FB6C4FD5C
                    userId: C4CA148F-F2C6-4E70-8349-57CC6DFC1C2B
                    status: Approved
                    message: Time card approved successfully.
          headers: {}
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              example:
                timeCards:
                  - error: 400
                    message: >-
                      Time card not approved. There are open time entries on the
                      time card
                  - error: 400
                    message: Invalid timeCardId
          headers: {}
      deprecated: false
      security: []

````