Whether you update a single person or a batch of persons, the operation returns some information with each update request.
-
Method persons/io/update (POST) returns a single object.
-
Method persons/io/updates (POST) returns an array of objects.
The object properties are:
|
action |
The actual update action. For example, if you submit a request for action ChangeOrCreate, the system either executes a Change or a Create and will assign the respective value to this property. In some cases, a requested action is changed to Skip. For example, if a Change request did not modify any property. |
string |
|
cid |
The company ID of the person. |
int |
|
pid |
The person ID of the person. It may be null if the operation failed. |
int? |
|
success |
True if the update was successful. |
bool |
|
errors |
Null or an array with error messages. If success is false you will always find error details in this collection. |
string[]? |
|
informations |
Null or an array with useful information. Typically this is used to inform you that a change request did not update any property. |
string[]? |
|
data |
The value for data you can optionally specify in the original request. |
string? |
Example for a failed update:
{
"pid": 677,
"cid": 537,
"action": "Create",
"success": false,
"errors": [
"Update failed. The person already exists. The requested create action is thus invalid."
],
"infos": null,
"data": "just a test"
}