Handling Responses from SimpleUPCSimpleUPC send a standardize response to every request, successful or not. It will always consist at least a field to indicate whether or not the operation was successful. Successful Responses:Successful responses will typically send the result of their operations in a field called result or results (depending on whether the method returns a single or multiple results).
<?xml version="1.0" encoding="UTF-8"?>
<response>
<success>true</success>
<usedExternal>false</usedExternal>
<result>
/* NOTE: Rest of response is omitted in example */
</response>
Unsuccessful Responses:XML:
<response>
<success>false</success>
<error>
<code>1</code>
<message><![CDATA[API Key Not Recognized]]></message>
</error>
</response>
JSON:
{
"success" : false,
"error" : {
"code" : 1,
"message" : "API Key Not Recognized"
}
}
Notes: |