post https://{install}.{geo}.deputy.com/api/v1/my/setup/addNewWorkplace
This endpoint allows you to add a new workplace/location to your existing Deputy install.
Data element | Requirements | Notes |
---|---|---|
strWorkplaceName | String naming the workplace | |
stWorkplaceTimezone | Timezone for the workplace using TZ database naming | See this website for information |
strAddress | String of the locations address | |
strLat | The latitude of the location using a string | |
strLon | The longitude of the location using a string | |
intCountry | An integer which defines which country the location is in | |
arrAreaNames | An array of the area names to add to the location | Example : ['Chef', 'Cashier'] |
strWorkplaceCode | A string with a length of 3 allowing you to define a short code for the location | |
strParentCompany | Name or integer id of the company the location belongs to | Optional |
strPayrollExportCode | String naming what to use as a code for payroll exports to applications such as Xero | Optional |
blnIsWorkplace | Whether the location is considered a workplace | Boolean 1 - True 0 - False |
blnIsPayrollEntity | Whether the location has payroll setup | Boolean 1- True 0 - False |
Example
{
"strWorkplaceName": "Simons Sambos - Sydney",
"strWorkplaceTimezone": "Australia/Sydney",
"strAddress": "580 George St",
"strLat": "151.2093",
"strLon": "33.8688",
"intCountry": 13,
"arrAreaNames": ["Chef", "Cashier"],
"strWorkplaceCode": "SYD",
"strPayrollExportCode": "SYDEXPORT",
"blnIsWorkplace": 1,
"blnIsPayrollEntity": 1
}