API return values
IMPORTANT The SOAP API entered a limited enhancement phase in Q4 2020. Access to version 1.6 will be deactivated.
ATWSResponse
The following API calls return an ATWSResponse object: query(), update(), create().
ATWSResponse will return information as follows.
ReturnCode |
1 = Success |
QueryResults |
An array of the related entities for the request.
|
QueryResultType |
A string representing the entity type being returned. |
Errors |
This retrieves and displays the errors (See ATWSError) |
NOTE If the field is of a nullable data type and the value is null, then the field is not returned in the response. String fields in the API are not nullable and will always be returned in the response.
ATWSError
The API returns an error when the ReturnCode is -1. An array of string objects representing the API error messages is returned.
Example SOAP XML Response with an Error:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<updateResponse xmlns="http://autotask.net/ATWS/v1_6/">
<updateResult>
<ReturnCode>-1</ReturnCode>
<EntityResults />
<EntityResultType>account</EntityResultType>
<Errors>
<ATWSError>
<Message>No matching records found. The logged in resource may not have the required permissions to update the data.</Message>
</ATWSError>
</Errors>
<EntityReturnInfoResults />
</updateResult>
</updateResponse>
</soap:Body>
</soap:Envelope>