The Version 1 REST API base path is:
https://api.stage.zenginehq.com/v1
For security reasons, the API is only open on HTTPS (Port 443). All other traffic will be blackholed.
All timestamps are returned in ISO 8601 format:
YYYY-MM-DDTHH:MM:SSZFor example:
2013-05-01T14:00:00Z
POST and PUT data can be received in the following formats:
application/jsonapplication/xmlapplication/x-www-form-urlencodedmultipart/form-data (required and only applicable on requests including file uploads)You must specify your preference using the Content-Type header. For example:
Content-Type: application/json
Media can be returned in JSON, XML and CSV formats:
application/jsonapplication/xmltext/csvYou can specify your preference as a URL extension
or by using the Accept header. The URL extension takes precedence. For example:
https://api.stage.zenginehq.com/v1/{resource}.json
Accept: application/xml
... will return a JSON-formatted response
A ?callback parameter can be used with any GET request to have the
results wrapped in a JavaScript function. This is typically required for client-side applications which
needs to make cross-domain requests to the Zengine API without using a proxy or the more modern
Cross-Origin Resource Sharing (CORS) strategy.
Example:
https://api.stage.zenginehq.com/v1/{resource}.json?callback=foo
foo({
"status": 200,
"code": 2000,
// etc
});
The JavaScript to handle the callback might look something like this:
function foo(response){
console.log('Status: ' + response.status);
}Typically, a JSON response will be served without any whitespace, saving bandwidth. For example:
https://api.stage.zenginehq.com/v1/{resource}.json
{"status":200,"code":2000,...}
It is often helpful to make this more readable for the purposes of API discovery and debugging.
You may use the ?pretty=1 parameter to return data in "pretty print" format:
https://api.stage.zenginehq.com/v1/{resource}.json
{
"status": 200,
"code": 2000,
...
}