Solar API v2 - Integration Specs


Ping/Post Overview

  1. Request is made as JSON or XML to Ping URL
  2. Auth Code and Price are returned from Jangl in Ping Response
  3. Request is made to Post URL containing the Auth Code from Ping Response
  4. Jangl will respond with either:

    a. Success response with Lead ID and Price as confirmation

    b. “Re-ping” response (Buyer is no longer available. Please resend lead to Ping to obtain new Auth Code)

    c. Denied response with reason

Direct Post Overview

  1. Request is made as JSON or XML to Direct Post URL
  2. Jangl will respond with either:

    a. Success response with Lead ID and Price as confirmation

    b. Denied response with reason

Testing URLs

Ping

https://example.leadprosper.tech/jangl/v2/solar/ping

Post

https://example.leadprosper.tech/jangl/v2/solar/post

Direct Post

https://example.leadprosper.tech/jangl/v2/solar/direct_post

Production URLs

Ping

https://example.leadprosper.tech/jangl/v2/solar/ping

Post

https://example.leadprosper.tech/jangl/v2/solar/post

Direct Post

https://example.leadprosper.tech/jangl/v2/solar/direct_post

Request Headers

You must use HTTP headers for authorization and formatting. The Authorization header is required and must contain your API key prefixed by the string literal “Token”, with whitespace separating the two strings. Example:

Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b

The request body may be formatted either as JSON (default) or XML. The API will determine how to parse the request by reading the Content-Type header. The two valid options are:

Content-Type: application/json
Content-Type: application/xml

The response will be formatted either as JSON (default) or XML. The API will determine how to render the response by reading the Accept header. The two valid options are:

Accept: application/json
Accept: application/xml

Request Variables

Name Data Type Required/ Optional Description
auth_code string required on POST Auth code from ping response expires 5 minutes after issued
meta object required Meta Object
contact object required Contact Object
data object required Data Object

Meta Variables

Name Data Type Required/ Optional Description
originally_created string required Timestamp in ECMA 262 date time string specification (ex. 2013-01-29T12:34:56.123Z)
source_id string required Source ID
offer_id string optional This should be a unique ID for this lead.
lead_id_code string optional 36 Character Jornaya LeadiD
trustedform_url URL optional Certificate URL from Trusted Form
trusted_form_certid string optional Trusted form cert id
tcpa_compliant boolean required Is lead TCPA compliant?
tcpa string optional TCPA Consent Text
user_agent string optional User Agent from browser
landing_url URL optional Landing Page
ip_address string required Must be a valid U.S. IP Address

Contact Variables

Name Data Type Required/ Optional Description
first_name string optional First name
last_name string optional Last name
email_address E-Mail optional Email address
phone_home US phone optional Home phone number
phone_cell US phone optional Cell phone number
phone_work US phone optional Work phone number
phone_ext number optional Ext phone number
phone_last_four string optional on PING Last 4 digits of phone number
address US address optional Primary address
address2 string optional Unit / Apt / Suite
city US city optional City
state US state required State
zip_code US zip code required Zip code
county string optional County
country string optional Country
dob date optional Date of Birth
gender list optional Gender

Data Variables

Name Data Type Required/ Optional Description
purchase_time_frame string optional Purchase Time Frame
roof_shade string optional Roof Shade
property_type string optional Property Type
credit_rating string optional Credit Rating

Ping / Post Example Requests

JSON Ping Request

POST /jangl/v2/solar/ping HTTP/1.1
Host: api.gateway.blueinkanalytics.com
Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b
Content-Type: application/json
Accept: application/json

{
    "meta": {
        "originally_created": "2015-09-15T14:12:00Z",
        "source_id": "1A2B3C4D",
        "offer_id": "13502",
        "universal_leadid": "4xyz78b9-0cdc-43a7-98ea-2b680a5313a2",
        "ip_address": "10.0.0.1"
    },
    "contact": {
        "phone_last_four": "0001",
        "state": "NY",
        "zip_code": "10010",
    },
    "data": {
        "injury": "Broken Bones"
    }
}

JSON Post Request

POST /jangl/v2/solar/post HTTP/1.1
Host: api.gateway.blueinkanalytics.com
Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b
Content-Type: application/json
Accept: application/json

{
    "auth_code": "DUWlqMFRXclBzZ2s9X18tMTEyNDk3MjE3Mg==",
    "meta": {
        "originally_created": "2015-09-15T14:12:00Z",
        "source_id": "1A2B3C4D",
        "offer_id": "13502",
        "universal_leadid": "4xyz78b9-0cdc-43a7-98ea-2b680a5313a2",
        "ip_address": "10.0.0.1"
    },
    "contact": {
        "state": "NY",
        "zip_code": "10010",
    },
    "data": {
        "injury": "Broken Bones"
    }
}

XML Ping Request

POST /jangl/v2/solar/ping HTTP/1.1
Host: api.gateway.blueinkanalytics.com
Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b
Content-Type: application/xml
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<SolarRequest>
    <Meta>
        <OriginallyCreated>2015-09-15T14:12:00Z</OriginallyCreated>
        <SourceID>1A2B3C4D</SourceID>
        <OfferID>13502</OfferID>
        <LeadIDCode>4xyz78b9-0cdc-43a7-98ea-2b680a5313a2</LeadIDCode>
        <LandingURL>https://www.somewebsite.com</LandingURL>
        <IPAddress>10.0.0.1</IPAddress>
    </Meta>
    <Contact>
        <PhoneLastFour>0001</PhoneLastFour>
        <State>NY</State>
        <ZipCode>10010</ZipCode>
    </Contact>
    <Data>
        <Injury>Broken Bones<Injury>
    </Data>
</SolarRequest>

XML Post Request

POST /jangl/v2/solar/post HTTP/1.1
Host: api.gateway.blueinkanalytics.com
Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b
Content-Type: application/xml
Accept: application/xml


<?xml version="1.0" encoding="UTF-8"?>
<SolarRequest>
    <AuthCode>DUWlqMFRXclBzZ2s9X18tMTEyNDk3MjE3Mg==</AuthCode>
    <Meta>
        <OriginallyCreated>2015-09-15T14:12:00Z</OriginallyCreated>
        <SourceID>1A2B3C4D</SourceID>
        <OfferID>13502</OfferID>
        <LeadIDCode>4xyz78b9-0cdc-43a7-98ea-2b680a5313a2</LeadIDCode>
        <LandingURL>https://www.somewebsite.com</LandingURL>
        <IPAddress>10.0.0.1</IPAddress>
    </Meta>
    <Contact>
        <State>NY</State>
        <ZipCode>10010</ZipCode>
    </Contact>
    <Data>
        <Injury>Broken Bones<Injury>
    </Data>
</SolarRequest>

Direct Post Example Requests

JSON Direct Post Request

POST /jangl/v2/solar/direct_post HTTP/1.1
Host: api.gateway.blueinkanalytics.com
Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b
Content-Type: application/json
Accept: application/json

{
    "meta": {
        "originally_created": "2015-09-15T14:12:00Z",
        "source_id": "1A2B3C4D",
        "offer_id": "13502",
        "universal_leadid": "4xyz78b9-0cdc-43a7-98ea-2b680a5313a2",
        "ip_address": "10.0.0.1"
    },
    "contact": {
        "state": "NY",
        "zip_code": "10010",

    },
    "data": {
        "injury": "Broken Bones"
    }
}

XML Direct Post Request

POST /jangl/v2/solar/direct_post HTTP/1.1
Host: api.gateway.blueinkanalytics.com
Authorization: Token b98bd15d7c80597fdc4cb2940c7f53e20bde125b
Content-Type: application/xml
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<SolarRequest>
    <Meta>
        <OriginallyCreated>2015-09-15T14:12:00Z</OriginallyCreated>
        <SourceID>1A2B3C4D</SourceID>
        <OfferID>13502</OfferID>
        <LeadIDCode>4xyz78b9-0cdc-43a7-98ea-2b680a5313a2</LeadIDCode>
        <LandingURL>https://www.somewebsite.com</LandingURL>
    </Meta>
    <Contact>
        <State>NY</State>
        <ZipCode>10010</ZipCode>
        <IPAddress>10.0.0.1</IPAddress>
    </Contact>
    <Data>
        <Injury>Broken Bones<Injury>
    </Data>
</SolarRequest>

Ping Responses

JSON - Success

{
  "status": "success",
  "price": 18.00,
  "auth_code": "DUWlqMFRXclBzZ2s9X18tMTEyNDk3MjE3Mg=="
}

JSON - Denied

{
    "status":"denied",
    "errors":{
        "meta":{
            "universal_leadid":["This field may not be blank."],
            "landing_url":["Enter a valid URL."]
        }
    }
}

XML - Success

<PingResponse>
    <Status>success</Status>
    <Price>18.00</Price>
    <AuthCode>DUWlqMFRXclBzZ2s9X18tMTEyNDk3MjE3Mg==</AuthCode>
</PingResponse>

XML - Denied

<?xml version="1.0" encoding="utf-8"?>
<PingResponse>
    <Status>denied</Status>
    <Errors>
        <Error>
            <Field>meta</Field>
            <Errors>
                <Error>
                    <Field>universal_leadid</Field>
                    <Message>This field may not be blank.</Message>
                </Error>
                <Error>
                    <Field>landing_url</Field>
                    <Message>Enter a valid URL.</Message>
                </Error>
            </Errors>
        </Error>
    </Errors>
</PingResponse>

Post Responses

JSON - Success

{
  "status": "success",
  "price": 18.00,
  "confirmation_id": 10382992
}

JSON - Re-ping

{
  "status": "re-ping"
}

JSON - Denied

{
    "status":"denied",
    "errors":{
        "meta":{
            "universal_leadid":["This field may not be blank."],
            "landing_url":["Enter a valid URL."]
        }
    }
}

XML - Success

<PostResponse>
    <Status>success</Status>
    <Price>18.00</Price>
    <ConfirmationID>10382992</ConfirmationID>
</PostResponse>

XML - Re-ping

<PostResponse>
    <Status>re-ping</Status>
<PostResponse>

XML - Denied

<?xml version="1.0" encoding="utf-8"?>
<PostResponse>
    <Status>denied</Status>
    <Errors>
        <Error>
            <Field>meta</Field>
            <Errors>
                <Error>
                    <Field>universal_leadid</Field>
                    <Message>This field may not be blank.</Message>
                </Error>
                <Error>
                    <Field>landing_url</Field>
                    <Message>Enter a valid URL.</Message>
                </Error>
            </Errors>
        </Error>
    </Errors>
</PostResponse>

Appendix - Field Values

Purchase Time Frame

  • Immediately
  • Within 1 months
  • 1-3 months
  • 3+ months

Roof Shade

  • No Shade
  • Some Shade
  • Full Shade
  • Not Sure

Property Type

  • Single Family
  • Multi Family
  • Apartment
  • Condo
  • Manufactured
  • Townhome
  • Duplex

Credit Rating

  • Excellent
  • Good
  • Fair
  • Poor