Results

Zenegy supports only JSON(application/json) response content type.

Zenegy APIs use result object to wrap the return information with some extra information.

Result object

The purpose of this result object wrapper is to provide extra information to the returned data. Result object is used by all new APIs and it will be used by all in the near future.

Bellow you can see example of the result object provided by Zenegy API.

Result example:

{
  "isEmpty": false,
  "value": {},
  "message": "",
  "isSuccess": true,
  "isFailure": false,
  "httpStatusCode": 200,
  "isNotFound": false
}
Property Description
isEmpty Indicating if the response has data in the value or it is void
value Value of the response(if any), record that is is provided
message String message explaining the result
isSuccess True if action succeeded
isFailure True if action failed
httpStatusCode Code description of the action result. Example 200 success

Legacy

In the legacy API endpoints result is not wrapped and the value of the response is placed in the body of the response.

This is used by Payroll Denmark API but it will be replaced in the near future.