Response
The Response custom type provides general acknowledgment messages that indicate if the email request was successful, or if the request resulted in an error or warning.
The following table lists the status types and related codes for Response. These codes are considered high-level status codes that describe the success or failure of the email request. The AdvisoryMessage custom type provides access to more detailed messages that describe the reasons for a failed email request.
Status Type | Description | Code |
---|---|---|
STATUS_SUCCESS | The request to the Deliver TMS is successful. | 0 |
STATUS_WARNING | The request encountered at least one warning, but no errors. The client can query the AdvisoryMessage type for more detail. | 1 |
STATUS_ERROR | The request encountered at least one error. | 2 |
Methods for Response
The Response type contains the following methods.
Method | Description | Returns |
---|---|---|
getAdvisoryMessages |
Returns the list of advisory messages. |
AdvisoryMessage[] |
getApiVersion |
Returns the API version. |
String |
getStatusCode |
Returns the most severe advisory message in the response. For example, if the response contains a warning (code: 1) and an error (code: 2) then this method returns a 2. |
Int |