---
updatedAt: 2026-04-27T16:09:54.000Z
agentTools:
  projectIndex: https://developer.deputy.com/llms.txt
---

# Set an Employee's Agreed Hours

Note that agreedHour.details.weeks is required but can be an empty array

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Deputy V2 API",
    "version": "1.0",
    "description": "\n\nFiltered to publicly-authenticated routes only (APIAuthenticator). Scoped-OAuth routes and internal JWT routes are excluded — see the separate \"Deputy V2 Scoped API\" spec for scoped endpoints."
  },
  "servers": [
    {
      "url": "https://{subdomain}.{region}.deputy.com/api",
      "description": "Deputy tenant",
      "variables": {
        "subdomain": {
          "default": "your-subdomain",
          "description": "Your Deputy tenant subdomain"
        },
        "region": {
          "default": "deputy",
          "enum": [
            "au",
            "eu",
            "na",
            "deputy"
          ],
          "description": "Deputy region: au, eu, na, or deputy (AU default)"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "AgreedHourPostRequest": {
        "type": "object",
        "properties": {
          "employeeId": {
            "type": "string"
          },
          "agreedHour": {
            "$ref": "#/components/schemas/v2modelAgreedHour"
          }
        }
      },
      "AgreedHourPostResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "agreedHour": {
            "$ref": "#/components/schemas/v2modelAgreedHour"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AgreedHourWeekWeekIndex": {
        "type": "string",
        "enum": [
          "UNSPECIFIED",
          "ONE",
          "TWO",
          "THREE",
          "FOUR"
        ],
        "default": "UNSPECIFIED"
      },
      "WorkPeriodChangesReason": {
        "type": "string",
        "enum": [
          "UNDEFINED",
          "REQUESTED_BY_EMPLOYEE",
          "BONA_FIDE",
          "OTHER"
        ],
        "default": "UNDEFINED"
      },
      "WorkPeriodCycle": {
        "type": "string",
        "enum": [
          "WEEKLY",
          "TWO_WEEK",
          "FOUR_WEEK"
        ],
        "default": "WEEKLY"
      },
      "modelAgreedHourDay": {
        "type": "object",
        "properties": {
          "day": {
            "type": "integer",
            "format": "int32",
            "title": ""
          },
          "shifts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelAgreedHourShift"
            },
            "title": ""
          }
        }
      },
      "modelAgreedHourDetails": {
        "type": "object",
        "properties": {
          "weeks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelAgreedHourWeek"
            },
            "title": ""
          }
        }
      },
      "modelAgreedHourShift": {
        "type": "object",
        "properties": {
          "startTime": {
            "type": "string",
            "title": ""
          },
          "endTime": {
            "type": "string",
            "title": ""
          },
          "breaks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelBreakTime"
            },
            "title": ""
          },
          "location": {
            "type": "integer",
            "format": "int32",
            "title": ""
          },
          "area": {
            "type": "integer",
            "format": "int32",
            "title": ""
          },
          "totalHours": {
            "type": "number",
            "format": "float",
            "title": ""
          },
          "changeDetails": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "modelAgreedHourStatus": {
        "type": "string",
        "enum": [
          "UNKNOWN",
          "PENDING",
          "ACCEPTED",
          "DECLINED",
          "FORCED"
        ],
        "default": "UNKNOWN"
      },
      "modelAgreedHourWeek": {
        "type": "object",
        "properties": {
          "week": {
            "$ref": "#/components/schemas/AgreedHourWeekWeekIndex",
            "title": " `json:\"week\"`"
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelAgreedHourDay"
            },
            "title": ""
          }
        }
      },
      "modelBreakTime": {
        "type": "object",
        "properties": {
          "breakType": {
            "$ref": "#/components/schemas/modelBreakTimeBreakType",
            "title": ""
          },
          "breakDuration": {
            "type": "string",
            "description": "e.g. `00:30` for a 30 minute break, `01:05` for a 1 hour 5 minute break.",
            "title": ""
          },
          "startBreakTime": {
            "type": "string",
            "description": "Formatted 24-hour time e.g. `10:00` or `14:30`",
            "title": ""
          },
          "endBreakTime": {
            "type": "string",
            "description": "Formatted 24-hour time e.g. `10:00` or `14:30`",
            "title": ""
          },
          "changeDetails": {
            "type": "string",
            "readOnly": true
          }
        }
      },
      "modelBreakTimeBreakType": {
        "type": "string",
        "enum": [
          "NO_BREAK",
          "MEAL",
          "REST"
        ],
        "default": "NO_BREAK"
      },
      "modelWorkPeriod": {
        "type": "object",
        "properties": {
          "cycle": {
            "$ref": "#/components/schemas/WorkPeriodCycle",
            "title": ""
          },
          "dayOfWeek": {
            "$ref": "#/components/schemas/modelWorkPeriodDayOfWeek",
            "title": ""
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "description": "Must refer to a day of the week matching `dayOfWeek`, otherwise an error occurs.",
            "title": ""
          },
          "startCycleDate": {
            "type": "string",
            "format": "date-time",
            "title": ""
          },
          "endCycleDate": {
            "type": "string",
            "format": "date-time",
            "title": ""
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "title": ""
          },
          "baselineDate": {
            "type": "string",
            "format": "date-time",
            "title": ""
          },
          "baselineComment": {
            "type": "string",
            "title": ""
          },
          "changesReason": {
            "$ref": "#/components/schemas/WorkPeriodChangesReason",
            "title": ""
          },
          "metadata": {
            "type": "string",
            "title": ""
          }
        },
        "title": "WorkPeriod model"
      },
      "modelWorkPeriodDayOfWeek": {
        "type": "string",
        "enum": [
          "SUNDAY",
          "MONDAY",
          "TUESDAY",
          "WEDNESDAY",
          "THURSDAY",
          "FRIDAY",
          "SATURDAY"
        ],
        "default": "SUNDAY"
      },
      "v2modelAgreedHour": {
        "type": "object",
        "properties": {
          "threshold": {
            "type": "number",
            "format": "float",
            "title": ""
          },
          "applyThreshold": {
            "type": "boolean",
            "title": ""
          },
          "workPeriod": {
            "$ref": "#/components/schemas/modelWorkPeriod",
            "title": ""
          },
          "details": {
            "$ref": "#/components/schemas/modelAgreedHourDetails",
            "title": ""
          },
          "workingDaysPerCycle": {
            "type": "number",
            "format": "float",
            "title": ""
          },
          "status": {
            "$ref": "#/components/schemas/modelAgreedHourStatus",
            "title": ""
          },
          "statusDate": {
            "type": "string",
            "format": "date-time",
            "title": ""
          },
          "statusChangedById": {
            "type": "integer",
            "format": "int32",
            "title": "",
            "readOnly": true
          },
          "comment": {
            "type": "string",
            "title": ""
          },
          "version": {
            "type": "string",
            "title": "",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "title": "",
            "readOnly": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "title": "",
            "readOnly": true
          },
          "recordId": {
            "type": "string",
            "title": "",
            "readOnly": true
          },
          "creatorEmployeeProfileId": {
            "type": "string",
            "title": "",
            "readOnly": true
          },
          "creatorEmployeeDisplayName": {
            "type": "string",
            "title": "",
            "readOnly": true
          },
          "creatorEmployeeProfilePic": {
            "type": "string",
            "title": "",
            "readOnly": true
          },
          "effectiveDate": {
            "type": "string",
            "title": ""
          }
        }
      }
    },
    "securitySchemes": {
      "ApiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "OAuth"
      }
    }
  },
  "paths": {
    "/management/v2/agreed_hour/{employeeId}": {
      "post": {
        "summary": "Set an Employee's Agreed Hours",
        "description": "Note that agreedHour.details.weeks is required but can be an empty array",
        "operationId": "AgreedHourServiceV2Controller_createAgreedHour",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgreedHourPostResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "tags": [
          "Agreed Hour"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgreedHourPostRequest"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiToken": []
    }
  ]
}
```