Skip to main content

Responses

All API endpoints return a standard JSON response envelope. This page documents the HTTP status codes used by the API and the structure of the response object.

HTTP Status Codes​

CodeTitleDescription
200OKThe request was successful.
400Bad requestBad request
401UnauthorizedYour authentication values are incorrect. Check the email and the token in the header.
404Not foundThe resource does not exist

Response Object​

Every response from the API follows the same structure, regardless of the endpoint called.

FieldTypeDescription
Typeint0 = Success; 1 = Error
ObjectobjectThe resulting object of the request (e.g., the created document). null on error.
ErrorMessagestringShort error message identifier, if an error occurred.
ErrorValueobjectContains Value (error code number) and Name (error code name). null on success. See Error Codes for the full list.
ErrorHumanReadablestringA human-readable text that explains the error found. null on success.
ValidationErrorsarrayList of validation error objects with details. null when there are no validation errors.
IsErrorbooleantrue if the request failed, false otherwise.
IsSuccessbooleantrue if the request succeeded, false otherwise.

Success Response​

When a request is successful, Type is 0, IsSuccess is true, and Object contains the result.

{
"Type": 0,
"Object": {
"DocumentId": 123456
},
"ErrorMessage": null,
"ErrorValue": null,
"ErrorHumanReadable": null,
"ValidationErrors": null,
"IsError": false,
"IsSuccess": true
}

Error Response​

When a request fails, Type is 1, IsError is true, and the error fields provide details about what went wrong.

{
"Type": 1,
"Object": null,
"ErrorMessage": null,
"ErrorValue": {
"Value": 6,
"Name": "ElementDoesNotExist"
},
"ErrorHumanReadable": null,
"ValidationErrors": null,
"IsSuccess": false,
"IsError": true
}
info

For a complete list of error codes and their meanings, see the Error Codes page.

Validation Error Response​

When the request contains invalid fields, the API returns a validation error with details in the ValidationErrors array.

{
"Type": 1,
"Object": null,
"ErrorMessage": null,
"ErrorValue": {
"Value": 2,
"Name": "ValidationError"
},
"ErrorHumanReadable": null,
"ValidationErrors": [
{
"Type": "DocumentIsADuplicate",
"Field": "DocumentDetailExternalId",
"Value": "6",
"ElementNumber": "67204",
"Detail": "Duplicate Document"
}
],
"IsSuccess": false,
"IsError": true
}

ValidationErrors Fields​

FieldTypeDescriptionExample
TypestringIdentifies the error with a token"DocumentIsADuplicate"
FieldstringName of the field in which validation failed"DocumentDetailExternalId"
ValuestringValue which failed validation"6"
ElementNumberstringIdentifies the index of the field in which validation failed"67204"
DetailstringDetailed error explanation"Duplicate Document"
tip

Always check IsError or IsSuccess in your integration to determine whether the request was processed correctly before reading the Object field.