Drobu

Prepared for: ABC Leads

Home Improvement 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://test-api.jangl.com/v2/home_improvement/ping

Post

https://test-api.jangl.com/v2/home_improvement/post

Direct Post

https://test-api.jangl.com/v2/home_improvement/direct_post

Production URLs

Ping

https://api.jangl.com/v2/home_improvement/ping

Post

https://api.jangl.com/v2/home_improvement/post

Direct Post

https://api.jangl.com/v2/home_improvement/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 a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4

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 optional Meta Object
contact object required Contact Object
data object required Data Object

Meta Variables

Name Data Type Required/ Optional Description
originally_created string optional Timestamp in ECMA 262 date time string specification (ex. 2013-01-29T12:34:56.123Z)
source_id string optional Source ID
offer_id string optional This should be a unique ID for this lead.
lead_id_code string optional 36 Character Jornaya LeadiD
trusted_form_cert_url string optional Certificate URL from Trusted Form
tcpa_compliant boolean optional Is lead TCPA compliant?
tcpa_consent_text string optional TCPA Consent Text
user_agent string optional User Agent from browser
landing_page_url string optional Page where form was filled out

Contact Variables

Name Data Type Required/ Optional Description
first_name string required on POST First name
last_name string required on POST Last name
email string required on POST Email address
phone string required on POST Primary phone number
phone2 string optional Secondary phone number
phone_last_four string optional on PING Last 4 digits of phone number
address string required on POST Primary address
address2 string optional Secondary address
city string required on POST City
state string required on POST State
zip_code string required Zip code
ip_address string required Must be a valid U.S. IP Address

Data Variables

Name Data Type Required/ Optional Description
best_call_time string required Best time to call
purchase_time_frame string required See Appendix
own_property string required Property owned by person making request?
credit_rating string optional See Appendix
additions object optional Additions Object
bathroom object optional Bathroom Object
cabinets object optional Cabinets Object
deck object optional Deck Object
doors object optional Door Object
electrical object optional Electrical Object
fencing object optional Fending Object
flooring object optional Flooring Object
garage_doors object optional Garage Doors Object
gutters object optional Gutters Object
handy_man object optional Handy Man Object
home_security object optional Home Security Object
hvac object optional HVAC Object
insulation object optional Insulation Object
kitchen object optional Kitchen Object
landscaping object optional Landscaping Object
painting object optional Painting Object
pest_control object optional Pest Control Object
plumbing object optional Plumbing Object
remodeling object optional Remodeling Object
roof object optional Roof Object
siding object optional Siding Object
stair_lift object optional Stair Lift Object
sunrooms object optional Sunrooms Object
swimming_pool object optional Swimming Pool Object
trees object optional Trees Object
windows object optional Windows Object

Addition Variables

Name Data Type Required/ Optional Description
addition_type string required See Appendix
square_footage integer optional Square footage of project

Bathroom Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix

Cabinet Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
location_in_house string optional See Appendix
current_materials string optional Current cabinet materials
reface string optional Materials to reface with

Deck Variables

Name Data Type Required/ Optional Description
material string required See Appendix
length integer optional Deck length
width integer optional Deck width

Door Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
material string required See Appendix
pre_hung boolean optional Is the door pre-hung?

Electrical Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
service_type string required See Appendix

Fencing Variables

Name Data Type Required/ Optional Description
fence_type string required See Appendix
length integer optional Fence area length
width integer optional Fence area width

Flooring

Name Data Type Required/ Optional Description
flooring_type string required See Appendix
inquiry_type string required See Appendix

Garage Doors Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
num_doors string required Number of garage doors to service
openers boolean required Are openers present?

Gutter Variables

Name Data Type Required/ Optional Description
protection boolean required Is gutter protection requested?

Handy Man Variables

Name Data Type Required/ Optional Description
location_in_home string optional See Appendix
service_type string optional Type of service

Home Security Variables

Name Data Type Required/ Optional Description
building_type string required See Appendix
usage string optional See Appendix

HVAC Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
air_type string required See Appendix
system_type string required Current cabinet materials

Insulation Variables

Name Data Type Required/ Optional Description
service_type string required See Appendix

Kitchen Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
cabinet_job string optional See Appendix

Landscaping Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
service_type string required See Appendix

Painting Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix

Pest Control Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix

Plumbing Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
service_type string required See Appendix

Remodeling Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
location_in_home string required See Appendix

Roof Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
roofing_type string required See Appendix

Siding Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
siding_type string required See Appendix

Stair Lift Variables

Name Data Type Required/ Optional Description
stair_type string required See Appendix
project_type string optional See Appendix
carry_weight integer optional See Appendix
num_stairs integer optional See Appendix
num_floors integer optional See Appendix
outdoor_stairs boolean optional See Appendix
stair_material string optional See Appendix

Sunroom Variables

Name Data Type Required/ Optional Description
num_rooms integer required Number of sunrooms
length integer required Sunroom length
width integer required Sunroom width

Swimming Pool Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
service_type string required See Appendix
pool_type string required See Appendix

Trees Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix

Windows Variables

Name Data Type Required/ Optional Description
project_type string required See Appendix
num_windows integer optional Number of windows needing service

Ping / Post Example Requests

JSON Ping Request

POST /v2/home_improvement/ping HTTP/1.1
Host: api.jangl.com
Authorization: Token a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4
Content-Type: application/json
Accept: application/json

{
    "meta": {
        "originally_created": "2015-09-15T14:12:00Z",
        "source_id": "1A2B3C4D",
        "offer_id": "13502",
        "lead_id_code": "4xyz78b9-0cdc-43a7-98ea-2b680a5313a2",
        "trusted_form_cert_url": "https://cert.trustedform.com/f886071...",
        "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
        "landing_page_url": "https://www.somewebsite.com",
        "tcpa_compliant": true,
        "tcpa_consent_text": "I agree to receive to be contacted by phone or email."
    },
    "contact": {
        "phone_last_four": "0001",
        "zip_code": "10010",
        "ip_address": "10.0.0.1"
    },
    "data": {
        "best_call_time": "Any time",
        "own_property": true,
        "purchase_time_frame": "1 to 3 Months",
        "credit_rating": "Excellent",
        "additions": {
            "addition_type": "Second Floor",
            "square_footage": 400
        },
        "bathroom": {
            "project_type": "Bath, sinks"
        },
        "cabinets": {
            "project_type": "Reface Existing Cabinets",
            "location_in_house": "Kitchen",
            "current_materials": "Wood",
            "reface": "Veneer"
        },
        "deck": {
            "material": "Composite",
            "length": 20,
            "width": 15
        },
        "doors": {
            "project_type": "repair",
            "material": "Metal",
            "pre_hung": true
        },
        "electrical": {
            "project_type": "Install",
            "service_type": "Generator"
        },
        "fencing": {
            "fence_type": "Wood",
            "length": 20,
            "width": 4
        },
        "flooring": {
            "flooring_type": "Hardwood",
            "inquiry_type": "Installation"
        },
        "garage_doors": {
            "project_type": "Replacement",
            "num_doors": 2,
            "openers": true
        },
        "gutters": {
            "protection": false
        },
        "handy_man": {
            "location_in_home": "House",
            "service_type": "Power wash"
        },
        "home_security": {
            "building_type": "House",
            "usage": "Commercial"
        },
        "hvac": {
            "project_type": "Repair",
            "air_type": "Cooling",
            "system_type": "Central AC"
        },
        "insulation": {
            "service_type": "Spray foam"
        },
        "kitchen": {
            "project_type": "Cabinets",
            "cabinet_job": "Install new custom cabinets"
        },
        "landscaping:": {
            "project_type": "Lawn Care",
            "service_type": "Front Yard"
        },
        "painting": {
            "project_type": "Interior Painting"
        },
        "pest_control": {
            "project_type": "Small animals"
        },
        "plumbing": {
            "project_type": "Install",
            "service_type": "Septic repair"
        },
        "remodeling:": {
            "project_type": "Multiple Rooms",
            "location_in_home": "Basement"
        },
        "roof": {
            "project_type": "Repair",
            "roofing_type": "Metal"
        },
        "siding": {
            "siding_type": "Wood",
            "project_type": "Replace siding"
        },
        "stair_lift": {
            "stair_type": "Straight Staircase",
            "project_type": "Private",
            "carry_weight": 200,
            "num_stairs": 25,
            "num_floors": 2,
            "outdoor_stairs": false,
            "stair_material": "Concrete"
        },
        "sunrooms": {
            "num_rooms": 3,
            "length": 10,
            "width": 13
        },
        "swimming_pool:": {
            "project_type": "Indoor",
            "service_type": "Repair",
            "pool_type": "Sauna"
        },
        "trees": {
            "project_type": "Shrubs"
        },
        "windows": {
            "project_type": "Interested in replacement windows",
            "num_windows": 6
        }
    }
}

JSON Post Request

POST /v2/home_improvement/post HTTP/1.1
Host: api.jangl.com
Authorization: Token a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4
Content-Type: application/json
Accept: application/json

{
    "auth_code": "DUWlqMFRXclBzZ2s9X18tMTEyNDk3MjE3Mg==",
    "meta": {
        "originally_created": "2015-09-15T14:12:00Z",
        "source_id": "1A2B3C4D",
        "offer_id": "13502",
        "lead_id_code": "4xyz78b9-0cdc-43a7-98ea-2b680a5313a2",
        "trusted_form_cert_url": "https://cert.trustedform.com/f886071...",
        "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
        "landing_page_url": "https://www.somewebsite.com",
        "tcpa_compliant": true,
        "tcpa_consent_text": "I agree to receive to be contacted by phone or email."
    },
    "contact": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "test@email.com",
        "phone": "2123456789",
        "address": "123 Main St. #12A",
        "city": "New York",
        "state": "NY",
        "zip_code": "10010",
        "ip_address": "10.0.0.1"
    },
    "data": {
        "best_call_time": "Any time",
        "own_property": true,
        "purchase_time_frame": "1 to 3 Months",
        "credit_rating": "Excellent",
        "additions": {
            "addition_type": "Second Floor",
            "square_footage": 400
        },
        "bathroom": {
            "project_type": "Bath, sinks"
        },
        "cabinets": {
            "project_type": "Reface Existing Cabinets",
            "location_in_house": "Kitchen",
            "current_materials": "Wood",
            "reface": "Veneer"
        },
        "deck": {
            "material": "Composite",
            "length": 20,
            "width": 15
        },
        "doors": {
            "project_type": "repair",
            "material": "Metal",
            "pre_hung": true
        },
        "electrical": {
            "project_type": "Install",
            "service_type": "Generator"
        },
        "fencing": {
            "fence_type": "Wood",
            "length": 20,
            "width": 4
        },
        "flooring": {
            "flooring_type": "Hardwood",
            "inquiry_type": "Installation"
        },
        "garage_doors": {
            "project_type": "Replacement",
            "num_doors": 2,
            "openers": true
        },
        "gutters": {
            "protection": false
        },
        "handy_man": {
            "location_in_home": "House",
            "service_type": "Power wash"
        },
        "home_security": {
            "building_type": "House",
            "usage": "Commercial"
        },
        "hvac": {
            "project_type": "Repair",
            "air_type": "Cooling",
            "system_type": "Central AC"
        },
        "insulation": {
            "service_type": "Spray foam"
        },
        "kitchen": {
            "project_type": "Cabinets",
            "cabinet_job": "Install new custom cabinets"
        },
        "landscaping:": {
            "project_type": "Lawn Care",
            "service_type": "Front Yard"
        },
        "painting": {
            "project_type": "Interior Painting"
        },
        "pest_control": {
            "project_type": "Small animals"
        },
        "plumbing": {
            "project_type": "Install",
            "service_type": "Septic repair"
        },
        "remodeling:": {
            "project_type": "Multiple Rooms",
            "location_in_home": "Basement"
        },
        "roof": {
            "project_type": "Repair",
            "roofing_type": "Metal"
        },
        "siding": {
            "siding_type": "Wood",
            "project_type": "Replace siding"
        },
        "stair_lift": {
            "stair_type": "Straight Staircase",
            "project_type": "Private",
            "carry_weight": 200,
            "num_stairs": 25,
            "num_floors": 2,
            "outdoor_stairs": false,
            "stair_material": "Concrete"
        },
        "sunrooms": {
            "num_rooms": 3,
            "length": 10,
            "width": 13
        },
        "swimming_pool:": {
            "project_type": "Indoor",
            "service_type": "Repair",
            "pool_type": "Sauna"
        },
        "trees": {
            "project_type": "Shrubs"
        },
        "windows": {
            "project_type": "Interested in replacement windows",
            "num_windows": 6
        }
    }
}

XML Ping Request

POST /v2/home_improvement/ping HTTP/1.1
Host: api.jangl.com
Authorization: Token a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4
Content-Type: application/xml
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<HomeImprovementRequest>
    <Meta>
        <OriginallyCreated>2015-09-15T14:12:00Z</OriginallyCreated>
        <SourceID>1A2B3C4D</SourceID>
        <OfferID>13502</OfferID>
        <LeadIDCode>4xyz78b9-0cdc-43a7-98ea-2b680a5313a2</LeadIDCode>
        <TrustedFormCertUrl>https://cert.trustedform.com/f886071...</TrustedFormCertUrl>
        <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</UserAgent>
        <LandingPageURL>https://www.somewebsite.com</LandingPageURL>
        <TCPACompliant>true</TCPACompliant>
        <TCPAConsentText>I agree to receive to be contacted by phone or email.</TCPAConsentText>
    </Meta>
    <Contact>
        <PhoneLastFour>0001</PhoneLastFour>
        <ZipCode>10010</ZipCode>
        <IPAddress>10.0.0.1</IPAddress>
    </Contact>
    <Data>
        <BestCallTime>Any time</BestCallTime>
        <OwnProperty>true</OwnProperty>
        <PurchaseTimeFrame>1 to 3 Months</PurchaseTimeFrame>
        <CreditRating>Excellent</CreditRating>
        <Additions>
            <AdditionType>Second Floor</AdditionType>
            <SquareFootage>400</SquareFootage>
        </Additions>
        <Bathroom>
            <ProjectType>Bath, sinks</ProjectType>
        </Bathroom>
        <Cabinets>
            <ProjectType>Reface Existing Cabinets</ProjectType>
            <LocationInHouse>Kitchen</LocationInHouse>
            <CurrentMaterials>Wood</CurrentMaterials>
            <Reface>Veneer</Reface>
        </Cabinets>
        <Deck>
            <Material>Composite</Material>
            <Length>20</Length>
            <Width>15</Width>
        </Deck>
        <Doors>
            <ProjectType>repair</ProjectType>
            <Material>Metal</Material>
            <PreHung>true</PreHung>
        </Doors>
        <Electrical>
            <ProjectType>Install</ProjectType>
            <ServiceType>Generator</ServiceType>
        </Electrical>
        <Fencing>
            <FenceType>Wood</FenceType>
            <Length>20</Length>
            <Width>4</Width>
        </Fencing>
        <Flooring>
            <FlooringType>Hardwood</FlooringType>
            <InquiryType>Installation</InquiryType>
        </Flooring>
        <GarageDoors>
            <ProjectType>Replacement</ProjectType>
            <NumDoors>2</NumDoors>
            <Openers>true</Openers>
        </GarageDoors>
        <Gutters>
            <Protection>false</Protection>
        </Gutters>
        <HandyMan>
            <LocationInHome>House</LocationInHome>
            <ServiceType>Power wash</ServiceType>
        </HandyMan>
        <HomeSecurity>
            <BuildingType>House</BuildingType>
            <Usage>Commercial</Usage>
        </HomeSecurity>
        <HVAC>
            <ProjectType>Repair</ProjectType>
            <AirType>Cooling</AirType>
            <SystemType>Central AC</SystemType>
        </HVAC>
        <Insulation>
            <ServiceType>Spray foam</ServiceType>
        </Insulation>
        <Kitchen>
            <ProjectType>Cabinets</ProjectType>
            <CabinetJob>Install new custom cabinets</CabinetJob>
        </Kitchen>
        <Landscaping>
            <ProjectType>Lawn Care</ProjectType>
            <ServiceType>Front Yard</ServiceType>
        </Landscaping>
        <Painting>
            <ProjectType>Interior Painting</ProjectType>
        </Painting>
        <PestControl>
            <ProjectType>Small animals</ProjectType>
        </PestControl>
        <Plumbing>
            <ProjectType>Install</ProjectType>
            <ServiceType>Septic repair</ServiceType>
        </Plumbing>
        <Remodeling>
            <ProjectType>Multiple Rooms</ProjectType>
            <LocationInHome>Basement</LocationInHome>
        </Remodeling>
        <Roof>
            <ProjectType>Repair</ProjectType>
            <RoofingType>Metal</RoofingType>
        </Roof>
        <Siding>
            <SidingType>Wood</SidingType>
            <ProjectType>Replace siding</ProjectType>
        </Siding>
        <StairLift>
            <StairType>Straight Staircase</StairType>
            <ProjectType>Private</ProjectType>
            <CarryWeight>200</CarryWeight>
            <NumStairs>25</NumStairs>
            <NumFloors>2</NumFloors>
            <OutdoorStairs>False</OutdoorStairs>
            <StairMaterial>Concrete</StairMaterial>
        </StairLift>
        <Sunrooms>
            <NumRooms>3</NumRooms>
            <Length>10</Length>
            <Width>13</Width>
        </Sunrooms>
        <SwimmingPool>
            <ProjectType>Indoor</ProjectType>
            <ServiceType>Repair</ServiceType>
            <PoolType>Sauna</PoolType>
        </SwimmingPool>
        <Trees>
            <ProjectType>Shrubs</ProjectType>
        </Trees>
        <Windows>
            <ProjectType>Interested in replacement Windows</ProjectType>
            <NumWindows>6</NumWindows>
        </Windows>
    </Data>
</HomeImprovementRequest>

XML Post Request

POST /v2/home_improvement/post HTTP/1.1
Host: api.jangl.com
Authorization: Token a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4
Content-Type: application/xml
Accept: application/xml


<?xml version="1.0" encoding="UTF-8"?>
<HomeImprovementRequest>
    <AuthCode>DUWlqMFRXclBzZ2s9X18tMTEyNDk3MjE3Mg==</AuthCode>
    <Meta>
        <OriginallyCreated>2015-09-15T14:12:00Z</OriginallyCreated>
        <SourceID>1A2B3C4D</SourceID>
        <OfferID>13502</OfferID>
        <LeadIDCode>4xyz78b9-0cdc-43a7-98ea-2b680a5313a2</LeadIDCode>
        <TrustedFormCertUrl>https://cert.trustedform.com/f886071...</TrustedFormCertUrl>
        <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</UserAgent>
        <LandingPageURL>https://www.somewebsite.com</LandingPageURL>
        <TCPACompliant>true</TCPACompliant>
        <TCPAConsentText>I agree to receive to be contacted by phone or email.</TCPAConsentText>
    </Meta>
    <Contact>
        <FirstName>John</FirstName>
        <LastName>Doe</LastName>
        <Email>test@email.com</Email>
        <Phone>2123456789</Phone>
        <Address>123 Main St. #12A</Address>
        <City>New York</City>
        <State>NY</State>
        <ZipCode>10010</ZipCode>
        <IPAddress>10.0.0.1</IPAddress>
    </Contact>
    <Data>
        <BestCallTime>Any time</BestCallTime>
        <OwnProperty>true</OwnProperty>
        <PurchaseTimeFrame>1 to 3 Months</PurchaseTimeFrame>
        <CreditRating>Excellent</CreditRating>
        <Additions>
            <AdditionType>Second Floor</AdditionType>
            <SquareFootage>400</SquareFootage>
        </Additions>
        <Bathroom>
            <ProjectType>Bath, sinks</ProjectType>
        </Bathroom>
        <Cabinets>
            <ProjectType>Reface Existing Cabinets</ProjectType>
            <LocationInHouse>Kitchen</LocationInHouse>
            <CurrentMaterials>Wood</CurrentMaterials>
            <Reface>Veneer</Reface>
        </Cabinets>
        <Deck>
            <Material>Composite</Material>
            <Length>20</Length>
            <Width>15</Width>
        </Deck>
        <Doors>
            <ProjectType>repair</ProjectType>
            <Material>Metal</Material>
            <PreHung>true</PreHung>
        </Doors>
        <Electrical>
            <ProjectType>Install</ProjectType>
            <ServiceType>Generator</ServiceType>
        </Electrical>
        <Fencing>
            <FenceType>Wood</FenceType>
            <Length>20</Length>
            <Width>4</Width>
        </Fencing>
        <Flooring>
            <FlooringType>Hardwood</FlooringType>
            <InquiryType>Installation</InquiryType>
        </Flooring>
        <GarageDoors>
            <ProjectType>Replacement</ProjectType>
            <NumDoors>2</NumDoors>
            <Openers>true</Openers>
        </GarageDoors>
        <Gutters>
            <Protection>false</Protection>
        </Gutters>
        <HandyMan>
            <LocationInHome>House</LocationInHome>
            <ServiceType>Power wash</ServiceType>
        </HandyMan>
        <HomeSecurity>
            <BuildingType>House</BuildingType>
            <Usage>Commercial</Usage>
        </HomeSecurity>
        <HVAC>
            <ProjectType>Repair</ProjectType>
            <AirType>Cooling</AirType>
            <SystemType>Central AC</SystemType>
        </HVAC>
        <Insulation>
            <ServiceType>Spray foam</ServiceType>
        </Insulation>
        <Kitchen>
            <ProjectType>Cabinets</ProjectType>
            <CabinetJob>Install new custom cabinets</CabinetJob>
        </Kitchen>
        <Landscaping>
            <ProjectType>Lawn Care</ProjectType>
            <ServiceType>Front Yard</ServiceType>
        </Landscaping>
        <Painting>
            <ProjectType>Interior Painting</ProjectType>
        </Painting>
        <PestControl>
            <ProjectType>Small animals</ProjectType>
        </PestControl>
        <Plumbing>
            <ProjectType>Install</ProjectType>
            <ServiceType>Septic repair</ServiceType>
        </Plumbing>
        <Remodeling>
            <ProjectType>Multiple Rooms</ProjectType>
            <LocationInHome>Basement</LocationInHome>
        </Remodeling>
        <Roof>
            <ProjectType>Repair</ProjectType>
            <RoofingType>Metal</RoofingType>
        </Roof>
        <Siding>
            <SidingType>Wood</SidingType>
            <ProjectType>Replace siding</ProjectType>
        </Siding>
        <StairLift>
            <StairType>Straight Staircase</StairType>
            <ProjectType>Private</ProjectType>
            <CarryWeight>200</CarryWeight>
            <NumStairs>25</NumStairs>
            <NumFloors>2</NumFloors>
            <OutdoorStairs>False</OutdoorStairs>
            <StairMaterial>Concrete</StairMaterial>
        </StairLift>
        <Sunrooms>
            <NumRooms>3</NumRooms>
            <Length>10</Length>
            <Width>13</Width>
        </Sunrooms>
        <SwimmingPool>
            <ProjectType>Indoor</ProjectType>
            <ServiceType>Repair</ServiceType>
            <PoolType>Sauna</PoolType>
        </SwimmingPool>
        <Trees>
            <ProjectType>Shrubs</ProjectType>
        </Trees>
        <Windows>
            <ProjectType>Interested in replacement Windows</ProjectType>
            <NumWindows>6</NumWindows>
        </Windows>
    </Data>
</HomeImprovementRequest>

Direct Post Example Requests

JSON Direct Post Request

POST /v2/home_improvement/direct_post HTTP/1.1
Host: api.jangl.com
Authorization: Token a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4
Content-Type: application/json
Accept: application/json

{
    "meta": {
        "originally_created": "2015-09-15T14:12:00Z",
        "source_id": "1A2B3C4D",
        "offer_id": "13502",
        "lead_id_code": "4xyz78b9-0cdc-43a7-98ea-2b680a5313a2",
        "trusted_form_cert_url": "https://cert.trustedform.com/f886071...",
        "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
        "landing_page_url": "https://www.somewebsite.com",
        "tcpa_compliant": true,
        "tcpa_consent_text": "I agree to receive to be contacted by phone or email."
    },
    "contact": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "test@email.com",
        "phone": "2123456789",
        "address": "123 Main St. #12A",
        "city": "New York",
        "state": "NY",
        "zip_code": "10010",
        "ip_address": "10.0.0.1"
    },
    "data": {
        "best_call_time": "Any time",
        "own_property": true,
        "purchase_time_frame": "1 to 3 Months",
        "credit_rating": "Excellent",
        "additions": {
            "addition_type": "Second Floor",
            "square_footage": 400
        },
        "bathroom": {
            "project_type": "Bath, sinks"
        },
        "cabinets": {
            "project_type": "Reface Existing Cabinets",
            "location_in_house": "Kitchen",
            "current_materials": "Wood",
            "reface": "Veneer"
        },
        "deck": {
            "material": "Composite",
            "length": 20,
            "width": 15
        },
        "doors": {
            "project_type": "repair",
            "material": "Metal",
            "pre_hung": true
        },
        "electrical": {
            "project_type": "Install",
            "service_type": "Generator"
        },
        "fencing": {
            "fence_type": "Wood",
            "length": 20,
            "width": 4
        },
        "flooring": {
            "flooring_type": "Hardwood",
            "inquiry_type": "Installation"
        },
        "garage_doors": {
            "project_type": "Replacement",
            "num_doors": 2,
            "openers": true
        },
        "gutters": {
            "protection": false
        },
        "handy_man": {
            "location_in_home": "House",
            "service_type": "Power wash"
        },
        "home_security": {
            "building_type": "House",
            "usage": "Commercial"
        },
        "hvac": {
            "project_type": "Repair",
            "air_type": "Cooling",
            "system_type": "Central AC"
        },
        "insulation": {
            "service_type": "Spray foam"
        },
        "kitchen": {
            "project_type": "Cabinets",
            "cabinet_job": "Install new custom cabinets"
        },
        "landscaping:": {
            "project_type": "Lawn Care",
            "service_type": "Front Yard"
        },
        "painting": {
            "project_type": "Interior Painting"
        },
        "pest_control": {
            "project_type": "Small animals"
        },
        "plumbing": {
            "project_type": "Install",
            "service_type": "Septic repair"
        },
        "remodeling:": {
            "project_type": "Multiple Rooms",
            "location_in_home": "Basement"
        },
        "roof": {
            "project_type": "Repair",
            "roofing_type": "Metal"
        },
        "siding": {
            "siding_type": "Wood",
            "project_type": "Replace siding"
        },
        "stair_lift": {
            "stair_type": "Straight Staircase",
            "project_type": "Private",
            "carry_weight": 200,
            "num_stairs": 25,
            "num_floors": 2,
            "outdoor_stairs": false,
            "stair_material": "Concrete"
        },
        "sunrooms": {
            "num_rooms": 3,
            "length": 10,
            "width": 13
        },
        "swimming_pool:": {
            "project_type": "Indoor",
            "service_type": "Repair",
            "pool_type": "Sauna"
        },
        "trees": {
            "project_type": "Shrubs"
        },
        "windows": {
            "project_type": "Interested in replacement windows",
            "num_windows": 6
        }
    }
}

XML Direct Post Request

POST /v2/home_improvement/direct_post HTTP/1.1
Host: api.jangl.com
Authorization: Token a0ef9fc12ddbeb1e414197540419f4f7e24d8cb4
Content-Type: application/xml
Accept: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<HomeImprovementRequest>
    <Meta>
        <OriginallyCreated>2015-09-15T14:12:00Z</OriginallyCreated>
        <SourceID>1A2B3C4D</SourceID>
        <OfferID>13502</OfferID>
        <LeadIDCode>4xyz78b9-0cdc-43a7-98ea-2b680a5313a2</LeadIDCode>
        <TrustedFormCertUrl>https://cert.trustedform.com/f886071...</TrustedFormCertUrl>
        <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</UserAgent>
        <LandingPageURL>https://www.somewebsite.com</LandingPageURL>
        <TCPACompliant>true</TCPACompliant>
        <TCPAConsentText>I agree to receive to be contacted by phone or email.</TCPAConsentText>
    </Meta>
    <Contact>
        <FirstName>John</FirstName>
        <LastName>Doe</LastName>
        <Email>test@email.com</Email>
        <Phone>2123456789</Phone>
        <Address>123 Main St. #12A</Address>
        <City>New York</City>
        <State>NY</State>
        <ZipCode>10010</ZipCode>
        <IPAddress>10.0.0.1</IPAddress>
    </Contact>
    <Data>
        <BestCallTime>Any time</BestCallTime>
        <OwnProperty>true</OwnProperty>
        <PurchaseTimeFrame>1 to 3 Months</PurchaseTimeFrame>
        <CreditRating>Excellent</CreditRating>
        <Additions>
            <AdditionType>Second Floor</AdditionType>
            <SquareFootage>400</SquareFootage>
        </Additions>
        <Bathroom>
            <ProjectType>Bath, sinks</ProjectType>
        </Bathroom>
        <Cabinets>
            <ProjectType>Reface Existing Cabinets</ProjectType>
            <LocationInHouse>Kitchen</LocationInHouse>
            <CurrentMaterials>Wood</CurrentMaterials>
            <Reface>Veneer</Reface>
        </Cabinets>
        <Deck>
            <Material>Composite</Material>
            <Length>20</Length>
            <Width>15</Width>
        </Deck>
        <Doors>
            <ProjectType>repair</ProjectType>
            <Material>Metal</Material>
            <PreHung>true</PreHung>
        </Doors>
        <Electrical>
            <ProjectType>Install</ProjectType>
            <ServiceType>Generator</ServiceType>
        </Electrical>
        <Fencing>
            <FenceType>Wood</FenceType>
            <Length>20</Length>
            <Width>4</Width>
        </Fencing>
        <Flooring>
            <FlooringType>Hardwood</FlooringType>
            <InquiryType>Installation</InquiryType>
        </Flooring>
        <GarageDoors>
            <ProjectType>Replacement</ProjectType>
            <NumDoors>2</NumDoors>
            <Openers>true</Openers>
        </GarageDoors>
        <Gutters>
            <Protection>false</Protection>
        </Gutters>
        <HandyMan>
            <LocationInHome>House</LocationInHome>
            <ServiceType>Power wash</ServiceType>
        </HandyMan>
        <HomeSecurity>
            <BuildingType>House</BuildingType>
            <Usage>Commercial</Usage>
        </HomeSecurity>
        <HVAC>
            <ProjectType>Repair</ProjectType>
            <AirType>Cooling</AirType>
            <SystemType>Central AC</SystemType>
        </HVAC>
        <Insulation>
            <ServiceType>Spray foam</ServiceType>
        </Insulation>
        <Kitchen>
            <ProjectType>Cabinets</ProjectType>
            <CabinetJob>Install new custom cabinets</CabinetJob>
        </Kitchen>
        <Landscaping>
            <ProjectType>Lawn Care</ProjectType>
            <ServiceType>Front Yard</ServiceType>
        </Landscaping>
        <Painting>
            <ProjectType>Interior Painting</ProjectType>
        </Painting>
        <PestControl>
            <ProjectType>Small animals</ProjectType>
        </PestControl>
        <Plumbing>
            <ProjectType>Install</ProjectType>
            <ServiceType>Septic repair</ServiceType>
        </Plumbing>
        <Remodeling>
            <ProjectType>Multiple Rooms</ProjectType>
            <LocationInHome>Basement</LocationInHome>
        </Remodeling>
        <Roof>
            <ProjectType>Repair</ProjectType>
            <RoofingType>Metal</RoofingType>
        </Roof>
        <Siding>
            <SidingType>Wood</SidingType>
            <ProjectType>Replace siding</ProjectType>
        </Siding>
        <StairLift>
            <StairType>Straight Staircase</StairType>
            <ProjectType>Private</ProjectType>
            <CarryWeight>200</CarryWeight>
            <NumStairs>25</NumStairs>
            <NumFloors>2</NumFloors>
            <OutdoorStairs>False</OutdoorStairs>
            <StairMaterial>Concrete</StairMaterial>
        </StairLift>
        <Sunrooms>
            <NumRooms>3</NumRooms>
            <Length>10</Length>
            <Width>13</Width>
        </Sunrooms>
        <SwimmingPool>
            <ProjectType>Indoor</ProjectType>
            <ServiceType>Repair</ServiceType>
            <PoolType>Sauna</PoolType>
        </SwimmingPool>
        <Trees>
            <ProjectType>Shrubs</ProjectType>
        </Trees>
        <Windows>
            <ProjectType>Interested in replacement Windows</ProjectType>
            <NumWindows>6</NumWindows>
        </Windows>
    </Data>
</HomeImprovementRequest>

Ping Responses

JSON - Success

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

JSON - Denied

{
    "status":"denied",
    "errors":{
        "meta":{
            "lead_id_code":["This field may not be blank."],
            "landing_page_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>lead_id_code</Field>
                    <Message>This field may not be blank.</Message>
                </Error>
                <Error>
                    <Field>landing_page_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":{
            "lead_id_code":["This field may not be blank."],
            "landing_page_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>lead_id_code</Field>
                    <Message>This field may not be blank.</Message>
                </Error>
                <Error>
                    <Field>landing_page_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

Credit Rating

  • Excellent
  • Good
  • Fair
  • Poor

Addition Type (Additions)

  • Ground floor
  • Second floor
  • Other

Project Type (Bathrooms)

  • Bath, sinks
  • Full bathroom
  • Tile

Project Type (Cabinets)

  • Install new custom cabinets
  • Install new pre-made cabinets
  • Repair existing cabinets
  • Reface existing cabinets

Location in House (Cabinets)

  • Kitchen
  • Bathroom
  • Utility room
  • Garage
  • Other

Material (Deck)

  • Composite
  • Wood
  • Other

Project Type (Doors)

  • New installation
  • Repair

Material (Doors)

  • Wood
  • Metal
  • Composite
  • Other

Project Type (Electrical)

  • Install
  • Repair

Service Type (Electrical)

  • Electric for home addition or remodel
  • Electrical wiring or panel upgrade
  • Generator
  • Home energy audit
  • Low voltage wiring
  • Outdoor lighting

Fence Type (Fencing)

  • Wood
  • Metal
  • Composite
  • Electric
  • Other

Flooring Type (Flooring)

  • Hardwood
  • Vinyl
  • Carpet
  • Tile
  • Composite

Inquiry Type (Flooring)

  • Installation
  • Repair

Project Type (Garage Doors)

  • New Construction
  • Replacement

Service Type (Handy Man)

  • House
  • Lawn
  • HVAC
  • Electrical
  • Roof
  • Plumbing

Building Type (Home Security)

  • House
  • Condo unit or apartment
  • Office
  • Large building
  • Other

Usage (Home Security)

  • Residential
  • Commercial

Project Type (HVAC)

  • New unit installed
  • Repair

Air Type (HVAC)

  • Cooling
  • Heating
  • Heating and cooling

System Type (HVAC)

  • Central AC
  • Gas boiler
  • Propane boiler
  • Oil boiler
  • Electric boiler
  • Heat pump
  • Water heater
  • Gas furnace
  • Propane furnace
  • Oil furnace
  • Electric furnace

Service Type (Insulation)

  • Blown in
  • Spray foam
  • Batten

Project Type (Kitchen)

  • Floor plan
  • Cabinets
  • Appliances
  • Counter tops or sinks
  • Flooring

Cabinet Job (Kitchen)

  • Install new custom cabinets
  • Install new pre-made cabinets
  • Repair existing cabinets
  • Reface existing cabinets

Project Type (Landscaping)

  • Landscaping
  • Lawn Care
  • Sprinklers

Service Type (Landscaping)

  • Front Yard
  • Back Yard

Project Type (Painting)

  • Exterior Painting
  • Interior Painting
  • Specialty Painting - Faux Finishes
  • Specialty Painting - Textures
  • Other

Project Type (Pest Control)

  • Ant Control
  • Bee Removal
  • Small animals
  • Termites

Project Type (Plumbing)

  • Install
  • Repair

Service Type (Plumbing)

  • Drain cleaning
  • Install or repair water heater
  • Plumbing work
  • Septic install or replace
  • Septic repair
  • Septic clean or pump out
  • Sewer main
  • Well pumps
  • Water main

Project Type (Remodeling)

  • Multiple Rooms
  • Single Room

Location in Home (Remodeling)

  • Bathroom
  • Basement
  • Kitchen

Project Type (Roof)

  • New roof for new home
  • New roof for an existing home
  • Repair
  • Shingle over existing roof

Roofing Type (Roof)

  • Asphalt shingle
  • Cedar shake
  • Metal
  • Tar
  • Tile
  • Natural state

Siding Type (Siding)

  • Vinyl
  • Wood
  • Metal
  • Stucco
  • Brick or stone
  • Other

Project Type (Siding)

  • Replace siding
  • Siding repair

Stair Type (Stair Lift)

  • Straight staircase
  • Curved staircase

Project Type (Stair Lift)

  • Private
  • Public

Stair Material (Stair Lift)

  • Concrete
  • Metal

Project Type (Swimming Pool)

  • Indoor
  • Outdoor

Service Type (Swimming Pool)

  • Repair
  • Install

Pool Type (Swimming Pool)

  • Swimming Pool
  • Sauna
  • Hot Tub

Project Type (Trees)

  • Trees
  • Shrubs
  • Stump removal

Project Type (Windows)

  • Interested in replacement windows
  • Need repair services at this time
  • Need repair but interested in new windows