Deleting/Archiving a location

As part of deleting a location, if employees are still associated with the location you will need to provide a target location id to migrate the employees to. This is not mandatory if you have already moved the employees from the location in Deputy.

URL

curl --location --request POST 'https://{install}.{geo}.deputy.com/api/v1/supervise/company/{id}/delete

Sample Payload

{
  "targetId": 8,
  "sourceId": 1,
  "deleteAssociations": true
}

Data ElementInfo
targetIdThe id of the location for which employees should be migrated to
sourceIdThe id of the location which is being deleted
deleteAssociationsForce delete all associations to the location. This will delete all future rosters and timesheets related to the location when true.

Archiving a location

Archiving a location is similar to delete other than the fact it can be unarchived in the future, there is a slight tweak to the url however.

curl --location --request POST 'https://{install}.{geo}.deputy.com/api/v1/supervise/company/{id}/archive

The payload remains the same however deleteAssociations is not an option for archiving.