Updating a location
Updating location information is easily achieved with the Deputy API, follow the below guide for details.
URL
curl --location --request POST 'https://{install}.{geo}.deputy.com/api/v1/supervise/company/{id}
The payload remains the same as adding a location, with the API being destructive in that all the data included in the payload will replace what is already associated to that location.
Sample Payload
{
  "Code": "1234",
  "Active": true,
  "ParentCompany": 1,
  "CompanyName": "The Company Co",
  "TradingName": "Company Pty Ltd",
  "IsWorkplace": 1,
  "IsPayrollEntity": 1,
  "PayrollExportCode": "PAY123",
  "Address": "123 Jones St, Sydney, NSW, 2001",
}
| Data Element | Info | 
|---|---|
| Code | The export code (not payroll export code) for the location | 
| Active | Boolean true/false as to whether the location is active | 
| ParentCompany | An integer of the record of the parent location (Enterprise only) | 
| CompanyName | The name of the company as a string | 
| TradingName | The name the company is trading as, as a string | 
| IsWorkplace | Whether this location should be considered a workplace. Either this or isPayrollEntity must be 1. | 
| isPayrollEntity | Whether this location is a pay centre. Either this or isWorkplace must be 1. | 
| PayrollExportCode | The code as a string which is set for the payroll export code for the location | 
| Address | The address of the location as a string. | 
Updated over 1 year ago