Call Now! (855) 248-4016

AmVenture REST API

 

Step-By-Step Guide for Posting Leads to AmVenture

 

Step 1:  IP Addresses to Whitelist and Sample File of Fields

We need the ranges of IP Addresses that you will be posting from to whitelist.  Please email George.laird@amventure.com with the subject of “IPs to Whitelist for [your company name here].”

We also need a sample file of the fields that you will be passing to us.  Along with the IP Addresses, please send us an excel file with the fields you will be passing to us, and sample values.  This excel file can be one or two rows of data.  

 

 

Step 2: Obtain VCC Value, Token, Client Secret, and Client ID

After your IPs have been whitelisted, we will send you a document containing the Refresh Token, Client Secret, and Client ID.  You will use these to access our system and post a test lead.  You must reach out to us separately to obtain the value you are to pass for VCC__c.   VCC requests can be sent to Nicole.Schillero@amventure.com.


 

Step 3:  Post a test lead and confirm

Please, carefully follow the instructions below to post a test lead.   When posting a test lead, the field “Company Name” must contain “AMVTEST.”   You can use “AMVTEST 1”, “AMVTEST MY COMPANY”, or any combination, as long as it contains “AMVTEST.”

Please let us know when you post your test lead and get a success response.  We will validate the data and either give you the thumbs up that we are good to go, or request some additional information or fields.
 

We must sign off on your test lead before going live.  

 


Technical Instructions For Posting A Lead

The AmVenture REST API will create (POST) a Lead

Base URL

All URLs referenced in the documentation for the REST API have the following base:

https://amventure.my.salesforce.com/services

The AmVenture REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Sample request

https://amventure.my.salesforce.com/services/data/v41.0/sobjects/Lead
Authorization: Bearer 00D8A...
Content-Type: application/json

Sample response

{ "id" : "00Qf4000001Y8TcEAA", "success" : true, "errors" : [Array[0]], }

Authentication

All requests to the REST API are protected with OAuth 2.0 authentication and require an Access Token. Due to the lifetime of an Acccess Token, a user would have to constantly log in to retreive a new Access Token. AmVenture provides users an "refresh token"* which can be used to obtain an access token prior to calling the REST API.

*A long-lived token that may be used to obtain a fresh access token on expiry of the access token in this response. This value is a secret. You should treat it like the user’s password and use appropriate measures to protect it.

Access Token

The client application obtains a new access token by POSTing a request to https://amventure.my.salesforce.com/services/oauth2/token*, with the payload of the form:

https://amventure.my.salesforce.com/services/oauth2/token?grant_type=refresh_token&client_id=3MVG9...&client
_secret=78...&refresh_token=5A... 

 

Parameters Description
grant_type Set this to refresh_token.
client_id Your application's client identifier.
client_secret Your application's client secret.
refresh_toke The refresh token provided in the previous authorization.

POST API

The AmVenture "POST" API (REST) creates a Lead.

Call REST API

On receipt of the access token, the client can call the AmVenture REST API, send a response to the user, and carry on servicing requests until the new access token expires.

 

Parameters Type Description Required
VCC__c Text(255) AmTrust will provide value Y
Company Text(255) The leads company Y
FirstName Text(40) The leads first name Y
LastName Text(80) The leads last name Y
Street Text Area The lead company's address line1 N
City Text(40) The leads company's city N
State Picklist The lead company's state
(complete spelling; "New York")
N
Postalcode Text The lead company's postal code N
Country Text The lead company's country
(complete spelling; "United States")
N
Title Text(128) The leads job title N
Email Email The leads business email address Y
Phone Phone The leads business phone Y
MobilePhone Phone The leads mobile phone N
Insurance_Number__c Text(100)   N
Years_In_Business__c Picklist Picklist Values To Pass (must be exact match):
•    New Business (Less than a year)
•    1-3 Years
•    4-10 Years
•    10+ Years
N
Years_In_Business_Integer__c Number (18,0) If you would like to pass an integer for Years In Business instead of the exact picklist values,
please use this field which accepts a number.
N
Number_Of_Employees__c Picklist Picklist Values To Pass (must be exact match):
•    Sole Proprietor
•    2-5 Employees
•    6-10 Employees
•    11-15 Employees
•    16-20 Employees
•    20+ Employees
N
Number_Of_Employees_Integer__c Number (18,0) If you would like to pass an integer for Number of Employees instead of the exact picklist values,
please use this field which accepts a number.
N
VRNA__SICCode__c Text (15) The lead company's sic code N
Annual_Revenue__c Text(255) The lead company's annual revenue
Example: $100,000.00 - $500,000.00
N
IP_Address__c Text(50) The ip address captured from the lead N
Google_Tracking_ID__c Text(255) The google id captured for the lead N
Business_Type__c Text(140) The business type pertaining to the lead. N
Legal_Entity__c Text(255) The legal entity of the business pertaining to the lead. N
Payroll__c Currency(18,0) The business payroll pertaining to the lead. N
Effective_Date__c Date The date which the policy will take effect. N
UTM_Source__c Text(255) URL variable used to identify the source. N
UTM_Medium__c Text(255) URL variable used to identify the channel. N
UTM_Campaign__c Text(255) URL variable used to identify the campaign. N
UTM_Content__c Text(255) URL variable used to identify the content. N
UTM_Term__c Text(255) URL variable used to identify the audience. N
TFN__c Phone The toll free number that the party called. N
ANI__c Phone The caller ID that is passed. N
Vendor_Tracking_ID__c Text(255) The specific ID that the vendor assigned to a specific lead. N
Description Long Text Area(32000) You can pass special text here that will show up on the lead record in the UI. 
If there are special notes, these go here.
N



Response: Message

Result: 201 Created

Sample

https://amventure.my.salesforce.com/services/data/v41.0/sobjects/Lead
Authorization: Bearer 00D8A... Content-Type: application/json

Payload

{"vcc__c":"1","Company":"ACME","FirstName":"Joe","MiddleName":null,"LastName":"Smith","Street":"1235 Circle","City":"New York","State":"New York","POSTALCODE":14464,"Title":"Sales Manager","Email":"joes@acme.me","Phone":"234506454","MobilePhone":"2344507454","Country":"United States","Insurance_Number__c":"Farmers","Years_In_Business__c":10,"NumberOfEmployees":100,"SIC_Code__c":null,"Annual_Revenue__c":100000.00,"IP_Address__c":"192.168.1.1","Google_Tracking_ID__c":"null","Business_Type__c":null,"Legal_Entity__c":null,"Payroll__c":null,"Effective_Date__c":null,"UTM_Source__c":null,"UTM_Medium__c":null,"UTM_Campaign__c":null,"UTM_Content__c":null,"UTM_Term__c":null,"TFN__c":null,"ANI__c":"3334511212","Vendor_Tracking_ID__c":null}

Response

{ "id" : "00Qf4000001Y8TcEAA", "success" : true, "errors" : [Array[0]],}