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

# Check consents for shifts

Check consents for shifts.

# 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": {
      "modelBreak": {
        "type": "object",
        "properties": {
          "slotType": {
            "$ref": "#/components/schemas/modelSlotType",
            "title": "type of slot"
          },
          "start": {
            "type": "integer",
            "format": "int32",
            "title": "can start break after seconds passed after shift start"
          },
          "end": {
            "type": "integer",
            "format": "int32",
            "title": "can end break after seconds passed after shift start"
          },
          "state": {
            "$ref": "#/components/schemas/modelBreakState",
            "title": "Break state"
          },
          "canStartEarly": {
            "type": "boolean",
            "title": "[Deprecated] can employee start break early, override shift template"
          },
          "canEndEarly": {
            "type": "boolean",
            "title": "[Deprecated] can employee end break early, override shift template"
          },
          "isMandatory": {
            "type": "boolean",
            "title": "[Deprecated] is it mandatory to take this break, override shift template"
          },
          "type": {
            "$ref": "#/components/schemas/tenantsharedv2modelBreakType",
            "title": "type of break"
          },
          "typeLabel": {
            "type": "string",
            "title": "break type name in config"
          },
          "startDateTime": {
            "type": "string",
            "title": "format ISO8601 eg 2024-06-25T13:45:00+01:00"
          },
          "endDateTime": {
            "type": "string",
            "title": "format ISO8601 eg 2024-06-25T13:45:00+01:00"
          }
        }
      },
      "modelBreakState": {
        "type": "string",
        "enum": [
          "NOT_START",
          "IN_PROGRESS",
          "FINISHED",
          "DURATION_ONLY",
          "DURATION_FINISHED"
        ],
        "default": "NOT_START",
        "title": "Break States"
      },
      "modelSlotType": {
        "type": "string",
        "enum": [
          "BREAK",
          "WORK",
          "CUSTOM"
        ],
        "default": "BREAK",
        "title": "Type of Slot"
      },
      "tenantsharedv2modelBreakType": {
        "type": "string",
        "enum": [
          "MEAL_BREAK",
          "REST_BREAK"
        ],
        "default": "MEAL_BREAK",
        "title": "Break Type"
      },
      "ChangesetShiftChangeset": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "mealbreakSlots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelBreak"
            }
          },
          "employee": {
            "type": "integer",
            "format": "int32"
          },
          "area": {
            "type": "integer",
            "format": "int32"
          },
          "isOpen": {
            "type": "boolean"
          },
          "approvalRequired": {
            "type": "boolean"
          }
        }
      },
      "CheckConsentResponseAggregated": {
        "type": "object",
        "properties": {
          "totalConsentRequired": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CheckConsentResponseViolatedRule": {
        "type": "object",
        "properties": {
          "ruleCode": {
            "type": "string"
          },
          "warning": {
            "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponseWarning"
          },
          "ruleConfigs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponseRuleConfig"
            }
          }
        }
      },
      "ConsentConsentAction": {
        "type": "string",
        "enum": [
          "NOT_SPECIFIED",
          "DELETE"
        ],
        "default": "NOT_SPECIFIED"
      },
      "ScheduleShiftCheckConsentRequestAction": {
        "type": "string",
        "enum": [
          "NOT_SPECIFIED",
          "DELETE"
        ],
        "default": "NOT_SPECIFIED"
      },
      "ScheduleShiftCheckConsentRequestConfig": {
        "type": "object",
        "properties": {
          "includeIsPublishRequired": {
            "type": "boolean"
          }
        }
      },
      "ScheduleShiftCheckConsentRequestData": {
        "type": "object",
        "properties": {
          "shifts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleShiftCheckConsentRequestShift"
            }
          },
          "config": {
            "$ref": "#/components/schemas/ScheduleShiftCheckConsentRequestConfig"
          }
        }
      },
      "ScheduleShiftCheckConsentRequestShift": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "changeset": {
            "$ref": "#/components/schemas/modelChangeset"
          },
          "action": {
            "$ref": "#/components/schemas/ScheduleShiftCheckConsentRequestAction"
          }
        }
      },
      "ScheduleShiftCheckConsentResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponseData"
          }
        }
      },
      "ScheduleShiftCheckConsentResponseAction": {
        "type": "string",
        "enum": [
          "NOT_PROVIDED",
          "CREATE",
          "MODIFY",
          "DELETE"
        ],
        "default": "NOT_PROVIDED"
      },
      "ScheduleShiftCheckConsentResponseData": {
        "type": "object",
        "properties": {
          "shifts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponseShift"
            }
          },
          "aggregated": {
            "$ref": "#/components/schemas/CheckConsentResponseAggregated"
          }
        }
      },
      "ScheduleShiftCheckConsentResponseOperation": {
        "type": "string",
        "enum": [
          "NOT_SPECIFIED",
          "GREATER_THAN",
          "LESS_THAN",
          "GREATER_THAN_OR_EQUAL",
          "LESS_THAN_OR_EQUAL",
          "EQUAL",
          "NOT_EQUAL"
        ],
        "default": "NOT_SPECIFIED"
      },
      "ScheduleShiftCheckConsentResponseRuleConfig": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "title": "What field of roster is triggering the consent"
          },
          "operation": {
            "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponseOperation",
            "title": "What operation is used for the consent checking"
          },
          "value": {
            "type": "string",
            "title": "The value of what is compared"
          },
          "gap": {
            "type": "integer",
            "format": "int32",
            "title": "How many days different between the shifts"
          },
          "space": {
            "type": "integer",
            "format": "int32",
            "title": "The duration from the next or previous shift to the current shift in seconds"
          },
          "action": {
            "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponseAction",
            "title": "The type of action performed on the shift, create/modify/delete"
          },
          "boundary": {
            "type": "string",
            "title": "The end boundary of consent window, i.e. either the shift start or the work period start"
          },
          "overnightGap": {
            "type": "integer",
            "format": "int32",
            "title": "The minimum gap in minutes from the end of the previous overnight shift to avoid triggering Clopening"
          }
        }
      },
      "ScheduleShiftCheckConsentResponseShift": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "isConsentRequired": {
            "type": "boolean"
          },
          "isPublishRequired": {
            "type": "boolean"
          },
          "violatedRules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckConsentResponseViolatedRule"
            }
          },
          "action": {
            "$ref": "#/components/schemas/ConsentConsentAction"
          }
        }
      },
      "ScheduleShiftCheckConsentResponseWarning": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "modelChangeset": {
        "type": "object",
        "properties": {
          "newData": {
            "$ref": "#/components/schemas/ChangesetShiftChangeset"
          }
        },
        "title": "Change-set for shift"
      }
    },
    "securitySchemes": {
      "ApiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "OAuth"
      }
    }
  },
  "paths": {
    "/management/v2/shifts:checkConsent": {
      "post": {
        "summary": "Check consents for shifts",
        "operationId": "ScheduleShiftV2Controller_checkConsent",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleShiftCheckConsentResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Shifts consent check"
        ],
        "description": "Check consents for shifts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleShiftCheckConsentRequestData"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiToken": []
    }
  ]
}
```