Follow

Success or failure responses

The default LeadConduit response to a lead submission returns HTTP code 201 (Created) and Content-Type: application/json. A “Success” response body will be a JSON structure that includes:

1. An "outcome": "success" element

2. A “lead” element with a sub-element named “id” that carries the lead’s unique LeadConduit identifier. Example:

 {
  "outcome": "success",
  "lead": {
    "id":"55c8e255g56r8d5f2e69e1d9"
    }
}

A “Failure” response body will be a JSON structure that includes:

1. An "outcome": "failure"element

2. A “reason” element that carries the customer-programmable failure reason

3. A “lead” element with a sub-element named “id” that carries the lead’s unique LeadConduit identifier.

Example:

{
  "outcome": "failure",
  "reason": "Failed email validation",
  "lead": {
    "id":"55c8e255g56r8d5f2e69e1d9"
    }
}

This format will also be returned if the submission has an Accept: application/json header. Optionally, if the submission includes an Accept: application/xml header, LeadConduit will format the response body as XML, like this:

<?xml version="1.0"?>
<result>
     <outcome>success</outcome>
     <reason/>
     <lead>
          <id>55c8e255g56r8d5f2e69e1d9</id>
     </lead>
</result>

Or, for a failed lead:

<?xml version="1.0"?>
<result>
     <outcome>failure</outcome>
     <reason>Failed email validation</reason>
     <lead>
          <id>55c8e255g56r8d5f2e69e1d9</id>
     </lead>
</result>
 
 
 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

You must be logged in to comment.