Staff

GET api/v2/Organisation/{Slug}/Staff

Description: Returns a list of staff Example: https://api.totalsynergy.com/"Organisation/testOrg/Staff Parameters: OrganisationId, CanBeAManager, IsDefault, ExcludeNoEmails
Optional Parameters:
OrganisationId long value - Returns only staff from the given organisation id
CanBeAManager bool value - Returns only staff that can be a manager
IsDefault bool value - Returns only staff that are the default
ExcludeNoEmails bool value - Excludes staff without emails
UpdatedDate UTC date value - only include staff updated on or after this date
CreatedDate UTC date value - only include staff created on or after this date
Response:

    [
    {
    "id": 5,
    "organisationId": 3,
    "name": "Adam HanniLongName",
    "lastName": "HanniLongName",
    "firstName": "Adam",
    "email": "adam.hannigan@totalsynergy.com",
    "contactTypeId": 0,
    "cardId": null,
    "address": null,
    "state": null,
    "city": null,
    "postcode": null,
    "bambooId": 0,
    "xeroId": null,
    "dateEmployment": "2016-06-24T00:00:00",
    "dateTermination": null,
    "position": null,
    "phone": null,
    "rate": "$50.00",
    "rateDisplay": "Administration",
    "isActive": true,
    "reportsTo": "Adam HanniLongName",
    "zipCode": null,
    "twitter": "twatter",
    "createdDate": "2016-06-24T00:00:00",
    "udpatedDate": "2016-06-24T00:00:00"
    },
    {
    "id": 6,
    "organisationId": 3,
    "name": "Frank Li'doncar",
    "lastName": "Li'doncar",
    "firstName": "Frank",
    "email": "frankdontcare@hotmail.com",
    "contactTypeId": 0,
    "cardId": null,
    "address": null,
    "state": null,
    "city": null,
    "postcode": null,
    "bambooId": 0,
    "xeroId": null,
    "dateEmployment": "2015-11-10T00:00:00",
    "dateTermination": null,
    "position": null,
    "phone": null,
    "rate": "$50.00",
    "rateDisplay": "Administration",
    "isActive": true,
    "reportsTo": "Adam HanniLongName",
    "zipCode": null,
    "twitter": null,
    "createdDate": "2016-06-24T00:00:00",
    "udpatedDate": "2016-06-24T00:00:00"
    }
    ]

Try it out

Loading...
200
        {Response body}
			
Method
GET
Request Headers
'Content-Type': 'application/json' token
URL
http://some url here.com

GET api/v2/Organisation/{Slug}/Staff/All

Description: Returns a list of all staff. If ids are provided, onyl staff that match the given ids will be returned Example: https://api.totalsynergy.com/"Organisation/{Slug}/Staff/All
Optional Parameters:
Ids Array of strings - ids of staff to search
Response:

    [
    {
    "addressHome": {
    "id": 5,
    "address1": "123 Home Street",
    "address2": "",
    "town": "ALLAMBIE",
    "state": "NSW",
    "zipCode": "2100",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "123 Home Street, ALLAMBIE, NSW, 2100, Australia"
    },
    "addressWork": {
    "id": 8,
    "address1": "345 Workj Street",
    "address2": "",
    "town": "AUBURN SOUTH",
    "state": "NSW",
    "zipCode": "2144",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "345 Workj Street, AUBURN SOUTH, NSW, 2144, Australia"
    },
    "addressPostal": {
    "id": 7,
    "address1": "",
    "address2": "",
    "town": "",
    "state": "",
    "zipCode": "",
    "country": "",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
    },
    "addressOther": {
    "id": 6,
    "address1": "",
    "address2": "",
    "town": "",
    "state": "",
    "zipCode": "",
    "country": "",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
    },
    "phones": {
    "mobile": "0404 040 040",
    "phone": "9999 8888",
    "phone2": "8787 8787",
    "phone3": "1234 5678",
    "skypeName": null,
    "twitter": "TwitterName",
    "linkedIn": null,
    "hasPhones": true
    },
    "id": 1,
    "organisationId": 3,
    "name": "Dev Ster",
    "lastName": "Ster",
    "firstName": "Dev",
    "email": "developer@totalsynergy.com",
    "contactTypeId": 0,
    "cardId": null,
    "dateEmployment": "2016-11-15T00:00:00",
    "dateTermination": null,
    "dateCreated": "2016-11-14T23:43:41.41",
    "dateUpdated": "2016-11-21T03:51:58.893",
    "position": null,
    "formalTitle": null,
    "rate": "$70.00",
    "rateDisplay": "Administration",
    "isActive": true,
    "reportsTo": "Dev Ster",
    "twitter": "TwitterName",
    "payRate": 0,
    "payType": null,
    "payTypeId": 0,
    "isPaidPerHour": false,
    "payRateEffectiveDate": "0001-01-01T00:00:00",
    "createdDate": "2016-06-24T00:00:00",
    "udpatedDate": "2016-06-24T00:00:00"
    },

    ...
    ]

GET api/v2/Organisation/{Slug}/Staff/{Id}

Description: Returns the staff member that matches the given id Example: https://api.totalsynergy.com/"Organisation/testOrg/Staff/1 Response:


    {
    "addressHome": {
    "id": 5,
    "address1": "123 Home Street",
    "address2": "",
    "town": "ALLAMBIE",
    "state": "NSW",
    "zipCode": "2100",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "123 Home Street, ALLAMBIE, NSW, 2100, Australia"
    },
    "addressWork": {
    "id": 8,
    "address1": "345 Workj Street",
    "address2": "",
    "town": "AUBURN SOUTH",
    "state": "NSW",
    "zipCode": "2144",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "345 Workj Street, AUBURN SOUTH, NSW, 2144, Australia"
    },
    "addressPostal": {
    "id": 7,
    "address1": "",
    "address2": "",
    "town": "",
    "state": "",
    "zipCode": "",
    "country": "",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
    },
    "addressOther": {
    "id": 6,
    "address1": "",
    "address2": "",
    "town": "",
    "state": "",
    "zipCode": "",
    "country": "",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
    },
    "phones": {
    "mobile": "0404 040 040",
    "phone": "9999 8888",
    "phone2": "8787 8787",
    "phone3": "1234 5678",
    "skypeName": null,
    "twitter": "TwitterName",
    "linkedIn": null,
    "hasPhones": true
    },
    "id": 1,
    "organisationId": 3,
    "name": "Dev Ster",
    "lastName": "Ster",
    "firstName": "Dev",
    "email": "developer@totalsynergy.com",
    "contactTypeId": 0,
    "cardId": null,
    "dateEmployment": "2016-11-15T00:00:00",
    "dateTermination": null,
    "createdDate": "2016-06-24T00:00:00",
    "udpatedDate": "2016-06-24T00:00:00",
    "position": null,
    "formalTitle": null,
    "rate": "$70.00",
    "rateDisplay": "Administration",
    "isActive": true,
    "reportsTo": "Dev Ster",
    "twitter": "TwitterName",
    "payRate": 0,
    "payType": null,
    "payTypeId": 0,
    "isPaidPerHour": false,
    "payRateEffectiveDate": "0001-01-01T00:00:00"
    }

POST api/v2/Organisation/{Slug}/Staff

Description: Creates a new staff member Example: https://api.totalsynergy.com/api/v2/Organisation/{Slug}/Contacts
Required Parameters:
FirstName string value of staff first name
LastName string value of staff last name
Name string value of staff full name
Optional Parameters:
DateEmployment Date value - start of staff's employment
DateTermination Date value - end of staff's employmen
IsActive bool value - determine whether staff is active in organisation
Twitter string value -staff's Twitter slug
Position string value - staff's job title
Rate string value - staff's rate
Pay Rate decimal value - staff's rate rate
Pay Type Id long value - pay type id corresponding to an existing pay type
IsPaidPerHour bool value - determine whether staff is paid per hour
PayRateEffectiveDate Date value - start of pay rate
Position string value - staff's job title
Email string value - staffs email
AddressHome AddressJson value containing detailed home address information
AddressWork AddressJson value containing detailed work address information
AddressPostal AddressJson value containing detailed postal address information
AddressOther AddressJson value containing detailed other address information
Phones Phone containing different phone options and values
Example Request:

{
  "name": "Radike Samo",
  "firstName" : "Radike",
  "lastName" : "Samo",
  "jobTitle" : "Professional Tackler",
  "roleId" : 0,
  "phones" : {
  	"mobile" : "0404 575 621",
  	"phone" : "9999 8888"
  },
  "addressWork" : {
  	"address1" : "Pilfer Street, RugbyVille",
  	"state" : "NSW",
  	"town" : "ANZ Stadium",
  	"country" : "Australia",
  	"zipcode" : 2009
  },
  "typeDisplay": "Employee",
  "email": "athlete@oldies.com"
}
                        
Response:

{
  "id": 14,
  "contactTypeId": 0,
  "organisationId": 3,
  "organisation": null,
  "avatar": null,
  "parentContactID": 0,
  "isStaff": true,
  "staffTypeName": null,
  "phones": {
    "mobile": "0404 575 621",
    "phone": "9999 8888",
    "phone2": null,
    "phone3": null,
    "skypeName": null,
    "twitter": null,
    "linkedIn": null,
    "hasPhones": true
  },
  "timezoneId": "AUS Eastern Standard Time",
  "userCurrentDate": "2016-11-17T16:11:45.7040138",
  "rolesDisplay": "",
  "roleId": 0,
  "emailDomain": null,
  "web": null,
  "jobTitle": null,
  "name": "Radike Samo",
  "initials": "RS",
  "localTime": "Thu, Nov 17, 2016 - 4:11 PM",
  "salutationId": 0,
  "salutation": null,
  "firstName": "Radike",
  "lastName": "Samo",
  "email": "athlete@oldies.com",
  "cardId": null,
  "hasAddresses": true,
  "addressHome": {
    "id": 37,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": null,
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
  },
  "addressWork": {
    "id": 40,
    "address1": "Pilfer Street, RugbyVille",
    "address2": null,
    "town": "ANZ Stadium",
    "state": "NSW",
    "zipCode": "2009",
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": true,
    "singleline": "Pilfer Street, RugbyVille, ANZ Stadium, NSW, 2009, Australia"
  },
  "addressPostal": {
    "id": 39,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": null,
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
  },
  "addressOther": {
    "id": 38,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": null,
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": ""
  },
  "typeColumnDisplay": "",
  "typeDisplay": null,
  "website": null,
  "phoneDisplay": "9999 8888",
  "profileImageURL": null
}                    

POST api/v2/Organisation/{Slug}/Staff/Update

Description: Updates a staff member. Note that blank properties will remove existing data Example: https://api.totalsynergy.com/api/v2/Organisation/{Slug}/Contacts/Update
Required Parameters:
Id long value of staff to update Id
OrganisationId long value of organisation to update staff in/td>
FirstName string value of staff first name
LastName string value of staff last name
Name string value of staff full name
Optional Parameters:
DateEmployment Date value - start of staff's employment
DateTermination Date value - end of staff's employmen
IsActive bool value - determine whether staff is active in organisation
Twitter string value -staff's Twitter slug
Position string value - staff's job title
Rate string value - staff's rate
Pay Rate decimal value - staff's rate rate
Pay Type Id long value - pay type id corresponding to an existing pay type
IsPaidPerHour bool value - determine whether staff is paid per hour
PayRateEffectiveDate Date value - start of pay rate
Position string value - staff's job title
Email string value - staffs email
AddressHome AddressJson value containing detailed home address information
AddressWork AddressJson value containing detailed work address information
AddressPostal AddressJson value containing detailed postal address information
AddressOther AddressJson value containing detailed other address information
Phones Phone containing different phone options and values
Example Request:

{
  "id" : 15,
  "name": "Phil Waugh",
  "lastName" : "Waugh",
  "organisationId" : 3,
}
                        
Response:

{
  "id": 15,
  "contactTypeId": 0,
  "organisationId": 3,
  "organisation": null,
  "avatar": null,
  "parentContactID": 0,
  "isStaff": true,
  "staffTypeName": null,
  "phones": {
    "mobile": null,
    "phone": null,
    "phone2": null,
    "phone3": null,
    "skypeName": null,
    "twitter": null,
    "linkedIn": null,
    "hasPhones": false
  },
  "timezoneId": "AUS Eastern Standard Time",
  "userCurrentDate": "2016-11-17T16:26:08.1132764",
  "rolesDisplay": "",
  "roleId": 0,
  "emailDomain": null,
  "web": null,
  "jobTitle": null,
  "name": "Waugh",
  "initials": "W",
  "localTime": "Thu, Nov 17, 2016 - 4:26 PM",
  "salutationId": 0,
  "salutation": null,
  "firstName": null,
  "lastName": "Waugh",
  "email": null,
  "cardId": null,
  "hasAddresses": false,
  "addressHome": {
    "id": 41,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": "Australia"
  },
  "addressWork": {
    "id": 44,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": "Australia"
  },
  "addressPostal": {
    "id": 43,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": "Australia"
  },
  "addressOther": {
    "id": 42,
    "address1": null,
    "address2": null,
    "town": null,
    "state": null,
    "zipCode": null,
    "country": "Australia",
    "latitude": 0,
    "longitude": 0,
    "hasAddress": false,
    "singleline": "Australia"
  },
  "typeColumnDisplay": "",
  "typeDisplay": null,
  "website": null,
  "phoneDisplay": null,
  "profileImageURL": null
}                    

DELETE api/v2/Organisation/{Slug}/Staff/Delete

Description: Deletes a staff member Example: https://api.totalsynergy.com/api/v2/Organisation/{Slug}/Contacts/Delete?StaffId=15 Parameters: long staffId* Response:

"success"

GET api/v2/Organisation/{Slug}/Staff/EmployeeTypes

Description: Returns a list of employee payment types to use in creation/updating Example: https://api.totalsynergy.com/"Organisation/testOrg/Staff/EmployeeTypes Response:

[
  {
    "id": 4,
    "name": "Casual"
  },
  {
    "id": 5,
    "name": "Contractor"
  },
  {
    "id": 3,
    "name": "Part time"
  },
  {
    "id": 1,
    "name": "Salary"
  },
  {
    "id": 7,
    "name": "Set cost"
  },
  {
    "id": 2,
    "name": "Wages"
  }
]