v1

latestOpenAPI 3.0.12026-07-245752052.0 MB
workerRequestRules

Create a worker request rule and associate it with a location or location group

post/api/serviceattendance/processes/workerRequestRules/createAndAssociate

Request body

requestType'shiftClaim' | 'dropShift' | 'timeOffRequest' | 'findCoverage' required

Type of worker request (dropShift, shiftClaim, timeOffRequest)

ruleType'autoApprove' | 'autoReject' required

Type of rule (autoApprove, autoReject)

locationUuidstring uuid

Location UUID to associate the rule with

locationGroupUuidstring uuid

Location group UUID to associate the rule with

Example request

{
  "rule": {
    "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
    "createdAt": "2021-05-05T01:02:03.924Z",
    "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
    "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
    "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
    "lastUpdatedByAudience": "employer",
    "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
    "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
    "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
    "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
    "deletedAt": "2017-07-21T17:32:28Z",
    "deletedBy": "f4428d27-c089-40c4-aa83-ce02e1ee1426"
  }
}

Response

Worker request rule created and associated successfully

uuidstring uuid
createdAtstring date-time
createdBystring uuid
lastUpdatedAtstring date-time
lastUpdatedBystring uuid
lastUpdatedByAudiencestring
lastUpdatedByAudienceUuidstring uuid
lastUpdatedByImpersonatedBystring uuid
lastUpdatedByCompanyUuidstring uuid
lastUpdatedByEnterpriseUuidstring uuid
activeboolean required
namestring
descriptionstring
prioritynumber
versionstring required
formatter'jsonRulesEngine'
deletedAtstring date-time
deletedBystring uuid
workerRequestSettingsUuidstring uuid

Example response

{
  "uuid": "f4428d27-c089-40c4-aa83-ce02e1ee1426",
  "createdAt": "2021-05-05T01:02:03.924Z",
  "createdBy": "1e4e9128-fbb2-4b0a-97fc-f65bb1efee55",
  "lastUpdatedAt": "2021-05-05T04:05:06.924Z",
  "lastUpdatedBy": "7097bb82-61bd-4724-82ac-eab598190e47",
  "lastUpdatedByAudience": "employer",
  "lastUpdatedByAudienceUuid": "68df4316-590a-4081-9f24-9d9311977c9d",
  "lastUpdatedByImpersonatedBy": "3462e1d4-0e27-4798-b4a2-76412ab21892",
  "lastUpdatedByCompanyUuid": "d310aada-b1ad-4e9a-b822-b90c3cdb65bb",
  "lastUpdatedByEnterpriseUuid": "a6420cdc-285a-4f75-8ccc-8edff6d60c0a",
  "deletedAt": "2017-07-21T17:32:28Z",
  "deletedBy": "f4428d27-c089-40c4-aa83-ce02e1ee1426"
}