POST public-api/employees/save
This method allows saving the employee details. Requires both Create and Update Employee permission. It accepts a maximum of 500 records at a time. In case the employee does not exist, a new record is created and on creation, it returns the employee ID. In the case of updating the existing record, then only the columns specified in the request model's "ApplicableFields" field are updated. If this field is null/empty then "all" fields are assumed to be updateable. To create/update addresses please use the API public-api/addresses/employee/save.
Request Information
URI Parameters
None.
Body Parameters
EmployeeSaveRequestName | Description | Type | Additional information |
---|---|---|---|
ApplicableFields |
By default this is a null or empty string array. However, if (during an update operation) it is sometimes desirable to update only certain properties/columns in the set ''Data''. |
Collection of string |
None. |
Data |
The payload member containing the actual values supplied by the consumer. This is a list that should contain at least one instance of data to be inserted or updated. |
Collection of EmployeeModelInfo |
None. |
Request Formats
application/json
{ "Data": [ { "RowNumber": 0, "EmployeeNumber": "1.544c594798c04175ab25a6d1f2a39130", "EmployeeFirstName": "NewI.M. 1", "EmployeeLastName": "DoeNew544c594798c04175ab25a6d1f2a39130", "EmployeeEmail": "emp.1.544c594798c04175ab25a6d1f2a39130@example.org", "EmployeeNote": "Some text for emp 544c594798c04175ab25a6d1f2a39130 1.", "HasAttachment": false }, { "RowNumber": 0, "EmployeeNumber": "2.544c594798c04175ab25a6d1f2a39130", "EmployeeFirstName": "NewI.M. 2", "EmployeeLastName": "DoeNew544c594798c04175ab25a6d1f2a39130", "EmployeeEmail": "emp.2.544c594798c04175ab25a6d1f2a39130@example.org", "EmployeeNote": "Some text for emp 544c594798c04175ab25a6d1f2a39130 2.", "HasAttachment": false }, { "RowNumber": 0, "EmployeeNumber": "3.544c594798c04175ab25a6d1f2a39130", "EmployeeFirstName": "NewI.M. 3", "EmployeeLastName": "DoeNew544c594798c04175ab25a6d1f2a39130", "EmployeeEmail": "emp.3.544c594798c04175ab25a6d1f2a39130@example.org", "EmployeeNote": "Some text for emp 544c594798c04175ab25a6d1f2a39130 3.", "HasAttachment": false }, { "RowNumber": 0, "EmployeeNumber": "4.544c594798c04175ab25a6d1f2a39130", "EmployeeFirstName": "NewI.M. 4", "EmployeeLastName": "DoeNew544c594798c04175ab25a6d1f2a39130", "EmployeeEmail": "emp.4.544c594798c04175ab25a6d1f2a39130@example.org", "EmployeeNote": "Some text for emp 544c594798c04175ab25a6d1f2a39130 4.", "HasAttachment": false }, { "RowNumber": 0, "EmployeeNumber": "5.544c594798c04175ab25a6d1f2a39130", "EmployeeFirstName": "NewI.M. 5", "EmployeeLastName": "DoeNew544c594798c04175ab25a6d1f2a39130", "EmployeeEmail": "emp.5.544c594798c04175ab25a6d1f2a39130@example.org", "EmployeeNote": "Some text for emp 544c594798c04175ab25a6d1f2a39130 5.", "HasAttachment": false } ] }
Response Information
Resource Description
WaspResultOfResultsName | Description | Type | Additional information |
---|---|---|---|
Data |
Type specific result that always depends on the function called. |
Results |
None. |
Messages |
List of Messages. All APIs should return messages. If an API function returns an error you can find more information about the error or errors in this collection of messages. |
Collection of WtResult |
None. |
BatchNumber |
This is a global batch number generated by a mass group of transaction records to be returned to the consumer on each call to rolling transaction rules. This requests that each group of Move/Add/Remove transaction batches is tied together. In prior products (such as Mobile Asset Cloud), all are set to null and the only time when the batch number is generated is for multiple check-out transactions but the old is to generate for each responsible party. |
integer |
None. |
HasError |
True if an API function result has an error message in the results. If this is false, the function succeeded but other informative messages may be available. |
boolean |
None. |
HasHttpError |
True if an API function call could not be fully posted to the server or the results could not be fully returned. |
boolean |
None. |
HasMessage |
True if any message is available. |
boolean |
None. |
HasSuccessWithMoreDataRemaining |
True if the server sent part of the data and there is more data available. Use with paging APIs to fetch data one page at a time. |
boolean |
None. |
TotalRecordsLongCount |
This is the total number of records available in the database based on the query and filer conditions provided. It is possible that the value can change from call to call as users add and delete records so this should not be used to page through multiple recordsets of data. This is used, for example, to set relative scroll bar sizes. When paging through data using functions like the assetadvancedinfosearch, calculating TotalRecordsLongCount for every page full of data is an time-consuming operation. To avoid that extra calculation, and help prevent throttling, assign TotalRecordsLongCount to TotalCountFromPriorFetch in the AdvancedSearchParameters to skip recalculating this total page count and to page thru the records faster. |
integer |
None. |
Response Formats
application/json
{ "Data": { "ResultList": [ { "ResultCode": 0, "Message": "Success.", "HttpStatusCode": 200 }, { "ResultCode": 0, "Message": "Success.", "HttpStatusCode": 200 }, { "ResultCode": 0, "Message": "Success.", "HttpStatusCode": 200 }, { "ResultCode": 0, "Message": "Success.", "HttpStatusCode": 200 }, { "ResultCode": 0, "Message": "Success.", "HttpStatusCode": 200 } ], "SuccessfullResults": 0, "TotalResults": 5 }, "Messages": [ { "ResultCode": 0, "Message": "Success.", "HttpStatusCode": 200, "FieldName": "" } ], "HasSuccessWithMoreDataRemaining": false, "HasError": false, "HasMessage": true, "HasHttpError": false }