Astoria Company Legal Integration Instructions


Contents

IMPORTANT NOTE: PLEASE ENSURE YOU CAREFULLY FOLLOW THE TESTING INSTRUCTIONS ONCE YOU'VE COMPLETED THE INTEGRATION!




Introduction to Ping/Post

Legal is a two-step integration process. Commonly, it is referred to as ping/post, i.e. first you send us a 'ping' (all data EXCEPT PII) and we respond with a bid (or outright rejection). Assuming we are the winning bidder, you would then 'post' the lead data (this time including PII), along with the <confirmation> code you received in the ping response.

Please review the following to complete the integration. When you believe you are ready, please follow these steps to test your integration, and then email us at tech@astoriacompany.com

Back to contents




Help / Support

For help or support, or if you have any questions during the integration, please email us at tech@astoriacompany.com

Back to contents




Ping:

What is a Ping?

A Ping is a call to our API with all of the lead data EXCEPT the PII. It's purpose is to determine if there is any interest in purchasing the lead, and if there is, to establish the price we would be willing to pay if a subsequent Post for the same lead is accepted.

IMPORTANT NOTE: TO ENSURE YOUR ACCOUNT IS NOT TEMPORARILY SUSPENDED BY OUR AUTO-THROTTLING MECHANISM, PLEASE DO NOT EXCEED 300 PINGS IN ANY 5 MINUTE PERIOD.

Field names and acceptable values

The absence of any required field (Required) will result in an error. If you do not collect the data for a required field, please refer to the 'Suggested Default' column.
Preferred fields (Preferred) may be omitted, but doing so could reduce a lead's chances of finding a buyer.
Optional fields (Optional) can be omitted without any major impact.

Field Contents Suggested Default Required?
lead_type Determines the type of lead.
MUST be '21' for Legal
21 Required
lead_mode Determines if the lead should be treated as a test lead or a live lead.
0 = TEST LEAD
1 = LIVE LEAD
Click here for full testing instructions.
Required
vendor_id This is the VID code you were provided by Astoria; if you do not know it, please contact us.
Please ensure you are using the correct code, otherwise your leads may be credited to another partner!
Required
sub_id Code of your choosing for your own tracking purposes, e.g. '123-ABC'
This should enable us to distinguish your lead sources from each other, so that we can optimize lead flow to buyers.
There is a maximum length of 35 characters, and it may only contain letters, numbers, underscores and hyphens.
Required
tcpa_optin Indicates whether or not the consumer was presented with, and accepted, unambiguous consent to be contacted via automated telephone systems pursuant to TCPA requirements.
0 = No
1 = Yes
Click here for more information.
0 Preferred
tcpa_text Contains the TCPA language the consumer was presented with on the form where their information was submitted,
e.g. 'By submitting this form…'
Click here for more information.
Preferred
universal_leadid Unique LeadiD as generated by LeadiD.com,
e.g. '1C5E08AC-C604-ADC6-CD3A-85C6E721CFE6'
Preferred
origination_datetime Date/time when lead was submitted by consumer, in format 'YYYY-MM-DD hh:mm:ss',
e.g. '2019-09-21 06:40:03'
Required
origination_timezone The timezone for the date/time passed in origination_datetime.
1 = EST / EDT
2 = CST / CDT
3 = MST / MDT
4 = PST / PDT
Required
ipaddress Applicants IP address, e.g. '35.175.191.150' Preferred
user_agent The user agent string for the browser used by the applicant when their information was submitted,
e.g. 'CCBot/2.0 (https://commoncrawl.org/faq/)'
Preferred
vendor_lead_id Your internal ID for this lead (useful if we need to contact you about a specific lead and when processing returns),
e.g. '44094188'
Preferred
url URL of form where lead was generated, e.g. 'http://thelawyerdirectory.com/' Preferred
minimum_price Minimum price you would accept for this lead, no $ symbol or commas, e.g. '2.00'
NOTE: For test leads (i.e. where lead_mode=0), our 'buyers' return very low prices (for safety). If you choose to include this optional parameter, then please set it to just '0.01' when testing to ensure you receive the expected responses.
WARNING: Setting a minimum_price will cause you to sell fewer leads!
Optional
zip Valid 5-digit US Zip Code.
Can be used when lead_mode=0 to influence test results.
Click here for full testing instructions.
Required
email Email address Required
legal_lead_type 1 = DUI
2 = Personal Injury
3 = Bankruptcy
4 = Divorce
5 = Criminal Defence
6 = Social Security & Disability
7 = Tax Law
8 = Railroad Cancer
9 = Risperdal
10 = IVC Filter
11 = Xarelto
12 = Talcum Powder
13 = TVM
Required

DUI Case Information - This section applies if legal_lead_type = 1 (DUI)

du_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
du_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Preferred
du_accident_injury Was there any accident or injury?
0 = No
1 = Yes
Preferred
du_challenge_dui Does client wish to challenge the DUI charge?
0 = No
1 = Yes
Preferred
du_challenge_suspension Does client wish to chalenge a driving suspension?
0 = No
1 = Yes
Preferred
du_prior_dui Does client have any prior DUI convictions?
0 = No
1 = Yes
Preferred
du_other_tickets Does client have any other recent tickets?
0 = No
1 = Yes
Preferred
du_court_date Court date, if known, in the format YYYY-MM-DD, e.g. '2019-09-21' Preferred
du_need_license Does client need their license for work or medical reasons?
0 = No
1 = Yes
Preferred
du_comments Any additional information provided by the client. Required

Personal Injury Case Information - This section applies if legal_lead_type = 2 (Personal Injury)

pi_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
pi_cause_of_injury What was the cause of clients injury?
1 = Auto Accident
2 = Work Injury
3 = Slip & Fall
4 = Product Liability
5 = Medical Malpractice
6 = Mass Transit Accident
7 = Wrongful Death
8 = Defective Drug
9 = Birth Defect
10 = Motorcycle Accident
11 = Truck Accident
12 = Other
Strongly Suggested Preferred
pi_cause_of_injury_other Required if pi_cause_of_injury = 12 (Other) - can be free-text. Optional
pi_type_of_injury What type of injury was sustained (if multiple, pick the main one)?
1 = Broken Bones
2 = Stitches
3 = Surgery
4 = Birth Injury
5 = Burns
6 = Brain Damage
7 = Sexual Abuse
8 = Hearing Loss
9 = Vision Loss
10 = Paralysis
11 = Other
Strongly Suggested Preferred
pi_type_of_injury_other Required if pi_type_of_injury = 11 (Other) - can be free-text. Optional
pi_injured_party Who was the injured party?
1 = Me
2 = Spouse
3 = Child
4 = Realtive
5 = Friend
Preferred
pi_estimated_medical_bills Estimated medical bills:
1 = Less than $10,000
2 = $10,000 to $20,000
3 = $20,000 to $30,000
4 = $30,000 to $40,000
5 = $40,000 to $50,000
6 = $50,000 to $60,000
7 = $60,000 to $70,000
8 = $70,000 to $80,000
9 = $80,000 to $90,000
10 = $90,000 to $100,000
11 = $100,000 to $125,000
12 = $125,000 to $150,000
13 = $150,000 to $200,000
14 = $200,000 to $250,000
15 = More than $250,000
Preferred
pi_injured_at_work Was client injured at work?
0 = No
1 = Yes
Preferred
pi_injury_date Injury date, in the format YYYY-MM-DD, e.g. '2019-09-21' Strongly Suggested Preferred
pi_injury_within_2_years Has client sustained other injuries within the past 2 years?
0 = No
1 = Yes
Preferred
pi_fault Was the client at fault for sustaining this injury?
0 = No
1 = Yes
Required
pi_comments Any additional information provided by the client. Required

Bankruptcy Case Information - This section applies if legal_lead_type = 3 (Bankruptcy)

bk_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
bk_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Required
bk_reasons Reason for filing for bankruptcy (if multiple, pick the main one)?
1 = Garnishment
2 = Creditor Harassment
3 = Repossession
4 = Foreclosure
5 = Lawsuits
6 = Illness / Disability
7 = License Suspension
8 = Divorce
9 = Loss of Income
10 = Other
Preferred
bk_bills What type of bills do you have (if multiple, pick the main one)?
1 = Credit Cards / Store Cards
2 = Personal Loans
3 = Child Support
4 = Student Loans
5 = Auto Loans
6 = Income Taxes
7 = Payday Loans
8 = Medical Bills
9 = Other
Preferred
bk_asset_types What type of assets do you have (if multiple, pick the main one)?
1 = Real Estate
2 = Auto
3 = Other
Preferred
bk_monthly_income Applicants monhly income - no commas, decimals or dollar symbol, e.g. '5000'. Strongly Suggested Preferred
bk_monthly_expenses Applicants monhly expenses - no commas, decimals or dollar symbol, e.g. '4000'. Preferred
bk_debt Applicants total debt - no commas, decimals or dollar symbol, e.g. '10000'. Strongly Suggested Preferred
bk_comments Any additional information provided by the client. Required

Divorce Case Information - This section applies if legal_lead_type = 4 (Divorce)

di_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
di_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Required
di_marital_status Applicants marital status.
1 = Unmarried, Living Together
2 = Unmarried, Do Not Live Together
3 = Married, Living Together
4 = Separated
5 = Divorced
6 = Other
3 Strongly Suggested Preferred
di_how_soon_retain How soon would client like legal representation?
1 = Immediately
2 = 1 to 3 months
3 = 3 to 6 months
4 = 6 to 9 months
Preferred
di_case_filed_in_court Has divorce case alrady been filed with court?
0 = No
1 = Yes
Preferred
di_hearing_scheduled Is a hearing already scheduled for this case?
0 = No
1 = Yes
Preferred
di_live_with_spouse Does client still live with their spouse?
0 = No
1 = Yes
Preferred
di_issues Are there any issues to be resolved?
1 = The parties do not agree - there are many outstanding issues to be resolved
2 = The parties agree on most issues, but not all - there are some outstanding issues to be resolved
3 = The parties have already come to an agreement on everything - there are no outstanding issues
Preferred
di_income Clients monhly income - no commas, decimals or dollar symbol, e.g. '5000'. Preferred
di_spouse_income Spouses monhly income - no commas, decimals or dollar symbol, e.g. '5000'. Preferred
di_assets What assets are owned by either party (if multiple, pick the main one)?
1 = House
2 = Vehicle(s)
3 = Vacation Property
4 = Jewelry
5 = Pension
6 = Stocks/Bonds
7 = IRA
8 = Other
Preferred
di_spouse_has_attorney Does spouse already have an attorney?
0 = No
1 = Yes
Preferred
di_child_count How many dependent children do you have? Preferred
di_has_children_with_spouse Were any of your children conceived with your current spouse? Preferred
di_comments Any additional information provided by the client. Required

Criminal Defence Case Information - This section applies if legal_lead_type = 5 (Criminal Defence)

cd_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
cd_charges_pressed Have charges already been pressed?
0 = No
1 = Yes
Required
cd_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Required
cd_any_one_arrested Was anyone arrested?
0 = No
1 = Yes
Preferred
cd_is_court_date_scheduled Is a court date scheduled?
0 = No
1 = Yes
Preferred
cd_court_date Court date, if applicable, in the format YYYY-MM-DD, e.g. '2019-09-21' Optional
cd_accused Who stands accused?
1 = Me
2 = Friend
3 = Parent
4 = Brother
5 = Sister
6 = Other Relative
Preferred
cd_criminal_charge_type What type of crime are they accused of committing?
1 = Drug Related
2 = Assault or Violent Crime
3 = Property Crime
4 = Crime Against Children
5 = Sex Crime
6 = White Collar Crime
7 = Traffic Ticket
8 = DUI
9 = Other
Preferred
cd_when_crime_committed When was the alleged crime committed?
1 = < 1 month
2 = 1-3 months
3 = 4-6 months
4 = 7-12 months
5 = > 12 months
3 Strongly Suggested Preferred
cd_charge_description Any additional information provided by the client Required

Social Security & Disability Case Information - This section applies if legal_lead_type = 6 (Social Security & Disability)

ss_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
ss_has_doctor Does client have a doctor?
0 = No
1 = Yes
Preferred
ss_visited_doctor If ss_has_doctor = 1 (Yes), then has client already visited a doctor?
0 = No
1 = Yes
Optional
ss_doctor_visit_outcome If ss_visited_doctor = 1 (Yes), please describe outcome of doctors visit - can be free-text. Optional
ss_applied_social_security_disability Has client already applied for social security / disability?
0 = No
1 = Yes
Strongly Suggested Preferred
ss_claim_pending Does client already have a claim pending?
0 = No
1 = Initial Stage
2 = Under Reconsideration
3 = Administrative Law Judge
4 = Appeals Council
Preferred
ss_when_condition_start When did condition first begin to affect client?
1 = < 1 year ago
2 = 1-3 years ago
3 = 3-5 years ago
4 = over 5 years ago
2 Strongly Suggested Preferred
ss_unable_to_work Is client unable to work?
0 = No
1 = Yes
Required
ss_age What is clients age? Required
ss_describe_disability Describe any disability - can be free-text. Optional
ss_dob Clients date of birth, in the format YYYY-MM-DD, e.g. '1994-07-16' Required
ss_benefits Does client receive social security benefits?
0 = No
1 = Yes
Required
ss_comments Any additional information provided by the client (REQUIRED FOR SOCIAL SECURITY). Required

Tax Law Case Information - This section applies if legal_lead_type = 7 (Tax Law)

tl_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
tl_dob Clients date of birth, in the format YYYY-MM-DD, e.g. '1994-07-16' Required
tl_state_or_federal_tax Type of taxes owed (1 of 2)?
1 = Federal Taxes
2 = State Taxes
3 = Both Federal and State Taxes
Required
tl_business_or_personal_tax Type of taxes owed (2 of 2)?
1 = Business Taxes
2 = Personal Taxes
3 = Both Business and Personal Taxes
Preferred
tl_total_tax_debt Total amount of taxes owed?
1 = Less than $10,000
2 = $10,000 => $20,000
3 = $20,000 => $30,000
4 = $30,000 => $40,000
5 = $40,000 => $50,000
6 = $50,000 => $60,000
7 = $60,000 => $70,000
8 = $70,000 => $80,000
9 = $80,000 => $90,000
10 = $90,000 => $100,000
11 = More than $100,000
Required
tl_filed_tax_returns Has client filed all due tax returns?
0 = No
1 = Yes
Preferred
tl_tax_problem Type of tax problem faced?
1 = Wage Garnishment
2 = Can't Pay Unpaid Taxes
3 = Bank Account Levy
4 = Innocent Spouse
5 = IRS Levy Against Customers
6 = Unpaid Penalties and Interest
7 = Lien Filed
Preferred

Railroad Cancer Case Information - This section applies if legal_lead_type = 8 (Railroad Cancer)

rr_cancer Were you or a loved one diagnosed with any of the following Cancers after working on a Railroad for at least five years?
1 = Bladder Cancer
2 = Colon Cancer
3 = Esophageal Cancer
4 = Hodgkin's Lymphoma
5 = Kidney Cancer
6 = Lung Cancer
7 = Mesothelioma
8 = Multiple Myeloma
9 = Non-Hodgkin's Lymphoma
10 = Laryngeal Cancer
11 = Rectal Cancer
12 = Stomach Cancer
13 = Throat Cancer
14 = Leukemia
15 = Other Cancer (Please explain in comments)
15 Required
rr_when_diagnosed When were you or a loved one diagnosed with Cancer?
YEAR, in the format YYYY, e.g. '2019'
Required
rr_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required
rr_comments Any additional information provided by the client. Optional

Risperdal Case Information - This section applies if legal_lead_type = 9 (Risperdal)

rs_injuries Have you or a loved one (males only) taken the medication Risperdal and suffered any of the following injuries?
1 = diagnosed gynecomastia
2 = diagnosed galactorrhea
3 = breast growth
4 = swollen nipples
Required
rs_age How old is the injured male that suffered these side effects?
Integer value for age in years
Required
rs_date_started What year did you or a loved one start taking Risperdal?
Date started, if applicable, in the format YYYY-MM-DD, e.g. '2019-09-21'
Required
rs_medication Which one of the following medications did the injured male take?
1 = Risperdal Brand Name (Oral)
2 = Risperidone (Oral)
3 = Risperdal/Consta (Injectable)
4 = Paliperidone (Injectable)
5 = Generic Risperdal (Produced by Patriot)
6 = Not Sure (Please explain in comments)
6 Required
rs_has_attorney Have you consulted an Attorney in regards to this?
0 = No
1 = Yes
Required
rs_comments Any additional information provided by the client. Optional

IVC Filter Case Information - This section applies if legal_lead_type = 10 (IVC Filter)

ivc_complications Did you or a loved one suffer any of the following complications after receiving the IVC Filter (Inferior Vena Cava) implant?
1 = Device Became Non-Removable
2 = Device Tilted
3 = Filter Fracture
4 = Device Migration
5 = Filter Perforation
6 = Device Embolization (Detached Components)
7 = Filter Punctured Blood Vessels or Organs
8 = Death
9 = Other (Please explain in comments)
9 Required
ivc_brand Do you know which one of the following IVC Filter Brands caused you or a loved one injuries?
1 = Bard
2 = Cook
3 = Greenfield (Boston Scientific)
4 = Johnson & Johnson (Cordis OptEase)
5 = I don't know
6 = Other
6 Required
ivc_implanted_after_2003 Was the IVC Filter implanted after January 2003?
0 = No
1 = Yes
Required
ivc_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required
ivc_comments Any additional information provided by the client. Optional

Xarelto Case Information - This section applies if legal_lead_type = 11 (Xarelto)

xar_side_effects Did you or a loved one suffer any of the following side effects while taking the blood thinner Xarelto?
1 = Internal Bleeding (Intestinal, Gastrointestinal, Kidney, Other Internal)
2 = Rectal Bleeding (Due to Internal Bleeding)
3 = Hemorrhagic Stroke (Also called a Bleeding Stroke)
4 = Death due to Internal Bleeding or a Stroke
5 = Ischemic Stroke
6 = Deep Vein Thrombosis (Blood Clot in the Leg)
7 = Pulmonary Embolism (Blood Clot in the Lungs)
8 = Blood Clots in other areas
9 = Heart Attack
Required
xar_hospitalized_24_hours_or_more Did your side effect require you to be in the hospital for 24 hours or longer?
0 = No
1 = Yes
Required
xar_occurred_after_jan_2012 Did any of those side effects due to Xarelto occur after January 2012?
0 = No
1 = Yes
Required
xar_directed_to_stop At the hospital, were you or a loved one directed to stop taking Xarelto by the Physician?
0 = No
1 = Yes
Required
xar_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required

Talcum Powder Case Information - This section applies if legal_lead_type = 12 (Talcum Powder)

tp_ovarian_cancer Have you or a loved one been diagnosed with Ovarian Cancer in the last 10 years?
0 = No
1 = Yes
Required
tp_used_four_or_more_years Did you or a loved one use Talcum Powder for 4 or more years?
0 = No
1 = Yes
Required
tp_over_65 Are you or a loved one over the Age of 65?
0 = No
1 = Yes
Required
tp_passed_away_last_3_years Did the loved one pass away from Ovarian Cancer within the last 3 years?
0 = No
1 = Yes
Required
tp_brca_negative Are you or a loved one BRCA Negative (Breast Cancer Susceptibility Gene)?
0 = No
1 = Yes
Required
tp_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required

TVM Case Information - This section applies if legal_lead_type = 13 (TVM)

tvm_had_bladder_sling_or_tvm_surgery HDid you have a Bladder Sling or Transvaginal Mesh Surgery?
0 = No
1 = Yes
Required
tvm_had_surgery_in_2005_or_after Was this original Bladder Sling or Transvaginal Mesh Surgery performed in 2005 or after?
0 = No
1 = Yes
Required
tvm_reason Was the reason you had received the initial Mesh Implant Surgery?
1 = Stress Urinary Incontinence (SUI)
2 = Pelvic Organ Prolapse (POP)
3 = Other (Please explain in comments)
3 Required
tvm_surgery_performed_vaginally Was the original surgery done Vaginally?
0 = No
1 = Yes
Required
tvm_revision_surgery Was there a Revision (replaced or removed) Surgery?
0 = No
1 = Yes
Required
tvm_had_revision_in_2005_or_after Was the Revision Surgery performed in 2005 or later?
0 = No
1 = Yes
Required
tvm_revision_performed_vaginally Was the Revision Surgery performed Vaginally?
0 = No
1 = Yes
Required
tvm_revision_under_anesthesia Was the Revision Surgery performed while you were under Anesthesia?
0 = No
1 = Yes
Required
tvm_has_attorney Have you consulted an Attorney in regards to this?
0 = No
1 = Yes
Required
tvm_comments Any additional information provided by the client. Optional

Sending a Ping Request

Ping Request Using HTTP/1.1 POST

Our PING URL is https://api.astoriacompany.com/v2/ping/. Please do not begin posting with lead_mode=1 until we have manually verified your test data (in addition to our automatic validation process), and we've explicitly notified you that your campaign has been activated within our system. Any leads posted to the live address while your campaign is still in test mode will return an error and neither be counted nor returned.

The data in the request should be URLENCODED to ensure it is received as intended.

Example Request

URL: https://api.astoriacompany.com/v2/ping/
Content-Type: application/x-www-form-urlencoded

lead_type=21&lead_mode=0&vendor_id=76&sub_id=6&tcpa_optin=1&tcpa_text=By+submitting+this+form...&universal_leadid=1C5E08AC-C604-ADC6-CD3A-85C6E721CFE6&origination_datetime=2019-09-21+06%3A40%3A03&origination_timezone=1&ipaddress=35.175.191.150&user_agent=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&vendor_lead_id=44094188&url=http%3A%2F%2Fcontractorhomequotes.com&zip=35222&legal_lead_type=1&du_how_financing=4&du_accident_injury=0&du_challenge_dui=1&du_challenge_suspension=1&du_prior_dui=0&du_other_tickets=0&du_need_license=1

Back to contents




Ping Responses

This is exact text that will definitely be present.
This indicates variable data, or nodes that may or may not be present.

Accept:

NOTE: An 'Accept' response on the PING does NOT indicate we purchased the lead, but ONLY that the lead has passed validation, has not been identified as a duplicate, and that we are responding with a bid for that lead. The 'Response' tag will always contain 'Accepted', but the 'Confirmation' code and the 'Price' will differ for each response.

<PingResponse>
<Response>Accepted</Response>
<Confirmation>12345678901</Confirmation>
<Price>6.00</Price>
</PingResponse>

Reject:

NOTE: There are many reasons why we might reject a ping - below you will see all the possible rejection responses. The 'Response' tag will always contain 'Rejected', and the 'Price' will always be '0.00'. The 'Confirmation' code will differ for each response.

For rejected responses, we also add two extra tags: 'Reason' tells you why the lead was rejected, and 'Message' gives some more descriptive text.

Also, where 'Reason' is 'Errors Detected', we add an 'Errors' section with a separate 'Error' node for each error - see the example below! This is designed to help you troubleshoot and fix any errors found.

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>No Buyers Found</Reason>
<Message>There were no buyers available to bid on this lead</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>No Buyers Found</Reason>
<Message>Bids do not meet minimum_price requirement</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Maintenance Mode</Reason>
<Message>Our system is currently in maintenance mode</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Post data is empty</Reason>
<Message>Please check your integration</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid lead_type</Reason>
<Message>Please pass a valid lead_type as per our specs</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid lead_type for this vendor_id</Reason>
<Message>You are not currently approved to send leads of the given lead_type</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid lead_mode</Reason>
<Message>Please ensure lead_mode is either '0' for TEST or '1' for LIVE</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid vendor_id</Reason>
<Message>Please check the vendor_id is correct</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Provided vendor_id is in TEST MODE</Reason>
<Message>Please contact us if you believe your account should be in LIVE MODE</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Daily Cap Exhausted</Reason>
<Message>Please contact us to increase your daily cap</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Per Minute Cap Exhausted</Reason>
<Message>Please contact us to increase your per minute cap</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Errors Detected</Reason>
<Message>The following errors were detected in this lead:</Message>
<Errors>
<Error>1</Error>
<Error>2</Error>
<Error>3</Error>
</Errors>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Duplicate Lead</Reason>
<Message>Lead was identified as a duplicate in our system</Message>
</PingResponse>

<PingResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Blacklisted Data</Reason>
<Message>The lead matches data on our internal blacklist - please investigate the lead source</Message>
</PingResponse>

Back to contents




Sample Ping Code

Here is some sample PHP code to help you create your call to our API. This is simple stuff, so you should be able to readily convery it into another programming language if necessary.

$apiUrl = 'https://api.astoriacompany.com/v2/ping/';

$headers = array('Content-Type: application/x-www-form-urlencoded');

$request = 'lead_type=21&lead_mode=0&vendor_id=76&sub_id=6&tcpa_optin=1&tcpa_text=By+submitting+this+form...&universal_leadid=1C5E08AC-C604-ADC6-CD3A-85C6E721CFE6&origination_datetime=2019-09-21+06%3A40%3A03&origination_timezone=1&ipaddress=35.175.191.150&user_agent=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&vendor_lead_id=44094188&url=http%3A%2F%2Fcontractorhomequotes.com&zip=35222&legal_lead_type=1&du_how_financing=4&du_accident_injury=0&du_challenge_dui=1&du_challenge_suspension=1&du_prior_dui=0&du_other_tickets=0&du_need_license=1';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);

$response = curl_exec($ch);
curl_close($ch);

Back to contents




Post:

What is a Post?

A Post is a call to our API with all of the lead data INCLUDING the PII. It's purpose is to attempt delivery of the actual lead to us, for the price established on the ping.

Field names and acceptable values

The absence of any required field (Required) will result in an error. If you do not collect the data for a required field, please refer to the 'Suggested Default' column.
Preferred fields (Preferred) may be omitted, but doing so could reduce a lead's chances of finding a buyer.
Optional fields (Optional) can be omitted without any major impact.

To make things easier for you, we have highlighted in green the additional fields that were not included in the Ping, but need to be added for the Post to pass validation.

Field Contents Suggested Default Required?
confirmation_id Astoria provided <Confirmation> code from corresponding ping repsonse.
MUST be provided on Post, else it will be treated as a fresh Ping.
Required
lead_type Determines the type of lead.
MUST be '21' for Legal
21 Required
lead_mode Determines if the lead should be treated as a test lead or a live lead.
0 = TEST LEAD
1 = LIVE LEAD
Click here for full testing instructions.
Required
vendor_id This is the VID code you were provided by Astoria; if you do not know it, please contact us.
Please ensure you are using the correct code, otherwise your leads may be credited to another partner!
Required
sub_id Code of your choosing for your own tracking purposes, e.g. '123-ABC'
This should enable us to distinguish your lead sources from each other, so that we can optimize lead flow to buyers.
There is a maximum length of 35 characters, and it may only contain letters, numbers, underscores and hyphens.
Required
tcpa_optin Indicates whether or not the consumer was presented with, and accepted, unambiguous consent to be contacted via automated telephone systems pursuant to TCPA requirements.
0 = No
1 = Yes
Click here for more information.
0 Preferred
tcpa_text Contains the TCPA language the consumer was presented with on the form where their information was submitted,
e.g. 'By submitting this form…'
Click here for more information.
Preferred
universal_leadid Unique LeadiD as generated by LeadiD.com,
e.g. '1C5E08AC-C604-ADC6-CD3A-85C6E721CFE6'
Preferred
origination_datetime Date/time when lead was submitted by consumer, in format 'YYYY-MM-DD hh:mm:ss',
e.g. '2019-09-21 06:40:03'
Required
origination_timezone The timezone for the date/time passed in origination_datetime.
1 = EST / EDT
2 = CST / CDT
3 = MST / MDT
4 = PST / PDT
Required
ipaddress Applicants IP address, e.g. '35.175.191.150' Required
user_agent The user agent string for the browser used by the applicant when their information was submitted,
e.g. 'CCBot/2.0 (https://commoncrawl.org/faq/)'
Preferred
vendor_lead_id Your internal ID for this lead (useful if we need to contact you about a specific lead and when processing returns),
e.g. '44094188'
Preferred
url URL of form where lead was generated, e.g. 'http://thelawyerdirectory.com/' Preferred
minimum_price Minimum price you would accept for this lead, no $ symbol or commas, e.g. '2.00'
NOTE: For test leads (i.e. where lead_mode=0), our 'buyers' return very low prices (for safety). If you choose to include this optional parameter, then please set it to just '0.01' when testing to ensure you receive the expected responses.
WARNING: Setting a minimum_price will cause you to sell fewer leads!
Optional
first_name Applicants first name. Required
last_name Applicants last name. Required
email Email address Required
address Street Address Required
zip Valid 5-digit US Zip Code.
Can be used when lead_mode=0 to influence test results.
Click here for full testing instructions.
Required
primary_phone Primary phone number, exactly 10 digits (3 For PhoneAreaCode, 3 For PhoneExchange and 4 For PhoneSuffix ) no (), -, or spaces Required
secondary_phone Secondary phone number, exactly 10 digits (3 For PhoneAreaCode, 3 For PhoneExchange and 4 For PhoneSuffix ) no (), -, or spaces Optional
legal_lead_type 1 = DUI
2 = Personal Injury
3 = Bankruptcy
4 = Divorce
5 = Criminal Defence
6 = Social Security & Disability
7 = Tax Law
Required

DUI Case Information - This section applies if legal_lead_type = 1 (DUI)

du_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
du_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Preferred
du_accident_injury Was there any accident or injury?
0 = No
1 = Yes
Preferred
du_challenge_dui Does client wish to challenge the DUI charge?
0 = No
1 = Yes
Preferred
du_challenge_suspension Does client wish to chalenge a driving suspension?
0 = No
1 = Yes
Preferred
du_prior_dui Does client have any prior DUI convictions?
0 = No
1 = Yes
Preferred
du_other_tickets Does client have any other recent tickets?
0 = No
1 = Yes
Preferred
du_court_date Court date, if known, in the format YYYY-MM-DD, e.g. '2019-09-21' Preferred
du_need_license Does client need their license for work or medical reasons?
0 = No
1 = Yes
Preferred
du_comments Any additional information provided by the client. Required

Personal Injury Case Information - This section applies if legal_lead_type = 2 (Personal Injury)

pi_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
pi_cause_of_injury What was the cause of clients injury?
1 = Auto Accident
2 = Work Injury
3 = Slip & Fall
4 = Product Liability
5 = Medical Malpractice
6 = Mass Transit Accident
7 = Wrongful Death
8 = Defective Drug
9 = Birth Defect
10 = Motorcycle Accident
11 = Truck Accident
12 = Other
Strongly Suggested Preferred
pi_cause_of_injury_other Required if pi_cause_of_injury = 12 (Other) - can be free-text. Optional
pi_type_of_injury What type of injury was sustained (if multiple, pick the main one)?
1 = Broken Bones
2 = Stitches
3 = Surgery
4 = Birth Injury
5 = Burns
6 = Brain Damage
7 = Sexual Abuse
8 = Hearing Loss
9 = Vision Loss
10 = Paralysis
11 = Other
Strongly Suggested Preferred
pi_type_of_injury_other Required if pi_type_of_injury = 11 (Other) - can be free-text. Optional
pi_injured_party Who was the injured party?
1 = Me
2 = Spouse
3 = Child
4 = Realtive
5 = Friend
Preferred
pi_estimated_medical_bills Estimated medical bills:
1 = Less than $10,000
2 = $10,000 to $20,000
3 = $20,000 to $30,000
4 = $30,000 to $40,000
5 = $40,000 to $50,000
6 = $50,000 to $60,000
7 = $60,000 to $70,000
8 = $70,000 to $80,000
9 = $80,000 to $90,000
10 = $90,000 to $100,000
11 = $100,000 to $125,000
12 = $125,000 to $150,000
13 = $150,000 to $200,000
14 = $200,000 to $250,000
15 = More than $250,000
Preferred
pi_injured_at_work Was client injured at work?
0 = No
1 = Yes
Preferred
pi_injury_date Injury date, in the format YYYY-MM-DD, e.g. '2019-09-21' Strongly Suggested Preferred
pi_injury_within_2_years Has client sustained other injuries within the past 2 years?
0 = No
1 = Yes
Preferred
pi_fault Was the client at fault for sustaining this injury?
0 = No
1 = Yes
Required
pi_comments Any additional information provided by the client. Required

Bankruptcy Case Information - This section applies if legal_lead_type = 3 (Bankruptcy)

bk_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
bk_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Required
bk_reasons Reason for filing for bankruptcy (if multiple, pick the main one)?
1 = Garnishment
2 = Creditor Harassment
3 = Repossession
4 = Foreclosure
5 = Lawsuits
6 = Illness / Disability
7 = License Suspension
8 = Divorce
9 = Loss of Income
10 = Other
Preferred
bk_bills What type of bills do you have (if multiple, pick the main one)?
1 = Credit Cards / Store Cards
2 = Personal Loans
3 = Child Support
4 = Student Loans
5 = Auto Loans
6 = Income Taxes
7 = Payday Loans
8 = Medical Bills
9 = Other
Preferred
bk_asset_types What type of assets do you have (if multiple, pick the main one)?
1 = Real Estate
2 = Auto
3 = Other
Preferred
bk_monthly_income Applicants monhly income - no commas, decimals or dollar symbol, e.g. '5000'. Strongly Suggested Preferred
bk_monthly_expenses Applicants monhly expenses - no commas, decimals or dollar symbol, e.g. '4000'. Preferred
bk_debt Applicants total debt - no commas, decimals or dollar symbol, e.g. '10000'. Strongly Suggested Preferred
bk_comments Any additional information provided by the client. Required

Divorce Case Information - This section applies if legal_lead_type = 4 (Divorce)

di_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
di_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Required
di_marital_status Applicants marital status.
1 = Unmarried, Living Together
2 = Unmarried, Do Not Live Together
3 = Married, Living Together
4 = Separated
5 = Divorced
6 = Other
3 Strongly Suggested Preferred
di_how_soon_retain How soon would client like legal representation?
1 = Immediately
2 = 1 to 3 months
3 = 3 to 6 months
4 = 6 to 9 months
Preferred
di_case_filed_in_court Has divorce case alrady been filed with court?
0 = No
1 = Yes
Preferred
di_hearing_scheduled Is a hearing already scheduled for this case?
0 = No
1 = Yes
Preferred
di_live_with_spouse Does client still live with their spouse?
0 = No
1 = Yes
Preferred
di_issues Are there any issues to be resolved?
1 = The parties do not agree - there are many outstanding issues to be resolved
2 = The parties agree on most issues, but not all - there are some outstanding issues to be resolved
3 = The parties have already come to an agreement on everything - there are no outstanding issues
Preferred
di_income Clients monhly income - no commas, decimals or dollar symbol, e.g. '5000'. Preferred
di_spouse_income Spouses monhly income - no commas, decimals or dollar symbol, e.g. '5000'. Preferred
di_assets What assets are owned by either party (if multiple, pick the main one)?
1 = House
2 = Vehicle(s)
3 = Vacation Property
4 = Jewelry
5 = Pension
6 = Stocks/Bonds
7 = IRA
8 = Other
Preferred
di_spouse_has_attorney Does spouse already have an attorney?
0 = No
1 = Yes
Preferred
di_child_count How many dependent children do you have? Preferred
di_has_children_with_spouse Were any of your children conceived with your current spouse? Preferred
di_comments Any additional information provided by the client. Required

Criminal Defence Case Information - This section applies if legal_lead_type = 5 (Criminal Defence)

cd_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
cd_charges_pressed Have charges already been pressed?
0 = No
1 = Yes
Required
cd_how_financing How will client finance their legal representation?
1 = Borrowing
2 = Personal savings
3 = Family support
4 = Current income
5 = Will discuss payment options with my attorney
6 = Cannot afford legal fees
5 Required
cd_any_one_arrested Was anyone arrested?
0 = No
1 = Yes
Preferred
cd_is_court_date_scheduled Is a court date scheduled?
0 = No
1 = Yes
Preferred
cd_court_date Court date, if applicable, in the format YYYY-MM-DD, e.g. '2019-09-21' Optional
cd_accused Who stands accused?
1 = Me
2 = Friend
3 = Parent
4 = Brother
5 = Sister
6 = Other Relative
Preferred
cd_criminal_charge_type What type of crime are they accused of committing?
1 = Drug Related
2 = Assault or Violent Crime
3 = Property Crime
4 = Crime Against Children
5 = Sex Crime
6 = White Collar Crime
7 = Traffic Ticket
8 = DUI
9 = Other
Preferred
cd_when_crime_committed When was the alleged crime committed?
1 = < 1 month
2 = 1-3 months
3 = 4-6 months
4 = 7-12 months
5 = > 12 months
3 Strongly Suggested Preferred
cd_charge_description Any additional information provided by the client Required

Social Security & Disability Case Information - This section applies if legal_lead_type = 6 (Social Security & Disability)

ss_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
ss_has_doctor Does client have a doctor?
0 = No
1 = Yes
Preferred
ss_visited_doctor If ss_has_doctor = 1 (Yes), then has client already visited a doctor?
0 = No
1 = Yes
Optional
ss_doctor_visit_outcome If ss_visited_doctor = 1 (Yes), please describe outcome of doctors visit - can be free-text. Optional
ss_applied_social_security_disability Has client already applied for social security / disability?
0 = No
1 = Yes
Strongly Suggested Preferred
ss_claim_pending Does client already have a claim pending?
0 = No
1 = Initial Stage
2 = Under Reconsideration
3 = Administrative Law Judge
4 = Appeals Council
Preferred
ss_when_condition_start When did condition first begin to affect client?
1 = < 1 year ago
2 = 1-3 years ago
3 = 3-5 years ago
4 = over 5 years ago
2 Strongly Suggested Preferred
ss_unable_to_work Is client unable to work?
0 = No
1 = Yes
Required
ss_age What is clients age? Required
ss_describe_disability Describe any disability - can be free-text. Optional
ss_dob Clients date of birth, in the format YYYY-MM-DD, e.g. '1994-07-16' Required
ss_benefits Does client receive social security benefits?
0 = No
1 = Yes
Required
ss_comments Any additional information provided by the client (REQUIRED FOR SOCIAL SECURITY). Required

Tax Law Case Information - This section applies if legal_lead_type = 7 (Tax Law)

tl_has_attorney Does client already have an attorney?
0 = No
1 = Yes
1 Required
tl_dob Clients date of birth, in the format YYYY-MM-DD, e.g. '1994-07-16' Required
tl_state_or_federal_tax Type of taxes owed (1 of 2)?
1 = Federal Taxes
2 = State Taxes
3 = Both Federal and State Taxes
Required
tl_business_or_personal_tax Type of taxes owed (2 of 2)?
1 = Business Taxes
2 = Personal Taxes
3 = Both Business and Personal Taxes
Preferred
tl_total_tax_debt Total amount of taxes owed?
1 = Less than $10,000
2 = $10,000 => $20,000
3 = $20,000 => $30,000
4 = $30,000 => $40,000
5 = $40,000 => $50,000
6 = $50,000 => $60,000
7 = $60,000 => $70,000
8 = $70,000 => $80,000
9 = $80,000 => $90,000
10 = $90,000 => $100,000
11 = More than $100,000
Required
tl_filed_tax_returns Has client filed all due tax returns?
0 = No
1 = Yes
Preferred
tl_tax_problem Type of tax problem faced?
1 = Wage Garnishment
2 = Can't Pay Unpaid Taxes
3 = Bank Account Levy
4 = Innocent Spouse
5 = IRS Levy Against Customers
6 = Unpaid Penalties and Interest
7 = Lien Filed
Preferred

Railroad Cancer Case Information - This section applies if legal_lead_type = 8 (Railroad Cancer)

rr_cancer Were you or a loved one diagnosed with any of the following Cancers after working on a Railroad for at least five years?
1 = Bladder Cancer
2 = Colon Cancer
3 = Esophageal Cancer
4 = Hodgkin's Lymphoma
5 = Kidney Cancer
6 = Lung Cancer
7 = Mesothelioma
8 = Multiple Myeloma
9 = Non-Hodgkin's Lymphoma
10 = Laryngeal Cancer
11 = Rectal Cancer
12 = Stomach Cancer
13 = Throat Cancer
14 = Leukemia
15 = Other Cancer (Please explain in comments)
15 Required
rr_when_diagnosed When were you or a loved one diagnosed with Cancer?
YEAR, in the format YYYY, e.g. '2019'
Required
rr_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required
rr_comments Any additional information provided by the client. Optional

Risperdal Case Information - This section applies if legal_lead_type = 9 (Risperdal)

rs_injuries Have you or a loved one (males only) taken the medication Risperdal and suffered any of the following injuries?
1 = diagnosed gynecomastia
2 = diagnosed galactorrhea
3 = breast growth
4 = swollen nipples
Required
rs_age How old is the injured male that suffered these side effects?
Integer value for age in years
Required
rs_date_started What year did you or a loved one start taking Risperdal?
Date started, if applicable, in the format YYYY-MM-DD, e.g. '2019-09-21'
Required
rs_medication Which one of the following medications did the injured male take?
1 = Risperdal Brand Name (Oral)
2 = Risperidone (Oral)
3 = Risperdal/Consta (Injectable)
4 = Paliperidone (Injectable)
5 = Generic Risperdal (Produced by Patriot)
6 = Not Sure (Please explain in comments)
6 Required
rs_has_attorney Have you consulted an Attorney in regards to this?
0 = No
1 = Yes
Required
rs_comments Any additional information provided by the client. Optional

IVC Filter Case Information - This section applies if legal_lead_type = 10 (IVC Filter)

ivc_complications Did you or a loved one suffer any of the following complications after receiving the IVC Filter (Inferior Vena Cava) implant?
1 = Device Became Non-Removable
2 = Device Tilted
3 = Filter Fracture
4 = Device Migration
5 = Filter Perforation
6 = Device Embolization (Detached Components)
7 = Filter Punctured Blood Vessels or Organs
8 = Death
9 = Other (Please explain in comments)
9 Required
ivc_brand Do you know which one of the following IVC Filter Brands caused you or a loved one injuries?
1 = Bard
2 = Cook
3 = Greenfield (Boston Scientific)
4 = Johnson & Johnson (Cordis OptEase)
5 = I don't know
6 = Other
6 Required
ivc_implanted_after_2003 Was the IVC Filter implanted after January 2003?
0 = No
1 = Yes
Required
ivc_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required
ivc_comments Any additional information provided by the client. Optional

Xarelto Case Information - This section applies if legal_lead_type = 11 (Xarelto)

xar_side_effects Did you or a loved one suffer any of the following side effects while taking the blood thinner Xarelto?
1 = Internal Bleeding (Intestinal, Gastrointestinal, Kidney, Other Internal)
2 = Rectal Bleeding (Due to Internal Bleeding)
3 = Hemorrhagic Stroke (Also called a Bleeding Stroke)
4 = Death due to Internal Bleeding or a Stroke
5 = Ischemic Stroke
6 = Deep Vein Thrombosis (Blood Clot in the Leg)
7 = Pulmonary Embolism (Blood Clot in the Lungs)
8 = Blood Clots in other areas
9 = Heart Attack
Required
xar_hospitalized_24_hours_or_more Did your side effect require you to be in the hospital for 24 hours or longer?
0 = No
1 = Yes
Required
xar_occurred_after_jan_2012 Did any of those side effects due to Xarelto occur after January 2012?
0 = No
1 = Yes
Required
xar_directed_to_stop At the hospital, were you or a loved one directed to stop taking Xarelto by the Physician?
0 = No
1 = Yes
Required
xar_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required

Talcum Powder Case Information - This section applies if legal_lead_type = 12 (Talcum Powder)

tp_ovarian_cancer Have you or a loved one been diagnosed with Ovarian Cancer in the last 10 years?
0 = No
1 = Yes
Required
tp_used_four_or_more_years Did you or a loved one use Talcum Powder for 4 or more years?
0 = No
1 = Yes
Required
tp_over_65 Are you or a loved one over the Age of 65?
0 = No
1 = Yes
Required
tp_passed_away_last_3_years Did the loved one pass away from Ovarian Cancer within the last 3 years?
0 = No
1 = Yes
Required
tp_brca_negative Are you or a loved one BRCA Negative (Breast Cancer Susceptibility Gene)?
0 = No
1 = Yes
Required
tp_has_attorney Have you consulted with an Attorney on this case?
0 = No
1 = Yes
Required

TVM Case Information - This section applies if legal_lead_type = 13 (TVM)

tvm_had_bladder_sling_or_tvm_surgery HDid you have a Bladder Sling or Transvaginal Mesh Surgery?
0 = No
1 = Yes
Required
tvm_had_surgery_in_2005_or_after Was this original Bladder Sling or Transvaginal Mesh Surgery performed in 2005 or after?
0 = No
1 = Yes
Required
tvm_reason Was the reason you had received the initial Mesh Implant Surgery?
1 = Stress Urinary Incontinence (SUI)
2 = Pelvic Organ Prolapse (POP)
3 = Other (Please explain in comments)
3 Required
tvm_surgery_performed_vaginally Was the original surgery done Vaginally?
0 = No
1 = Yes
Required
tvm_revision_surgery Was there a Revision (replaced or removed) Surgery?
0 = No
1 = Yes
Required
tvm_had_revision_in_2005_or_after Was the Revision Surgery performed in 2005 or later? (only show if 5=yes)
0 = No
1 = Yes
Required
tvm_revision_performed_vaginally Was the Revision Surgery performed Vaginally? (only show if 5=yes)
0 = No
1 = Yes
Required
tvm_revision_under_anesthesia Was the Revision Surgery performed while you were under Anesthesia? (only show if 5=yes)
0 = No
1 = Yes
Required
tvm_has_attorney Have you consulted an Attorney in regards to this?
0 = No
1 = Yes
Required
tvm_comments Any additional information provided by the client. Optional

Sending a Post Request

Post Request Using HTTP/1.1 POST

Our POST URL is https://api.astoriacompany.com/v2/post/. Please do not begin posting with lead_mode=1 until we have manually verified your test data (in addition to our automatic validation process), and we've explicitly notified you that your campaign has been activated within our system. Any leads posted to the live address while your campaign is still in test mode will return an error and neither be counted nor returned.

The data in the request should be URLENCODED to ensure it is received as intended.

Example Request

URL: https://api.astoriacompany.com/v2/post/
Content-Type: application/x-www-form-urlencoded

lead_type=21&lead_mode=0&vendor_id=76&sub_id=6&tcpa_optin=1&tcpa_text=By+submitting+this+form...&universal_leadid=1C5E08AC-C604-ADC6-CD3A-85C6E721CFE6&origination_datetime=2019-09-21+06%3A40%3A03&origination_timezone=1&ipaddress=35.175.191.150&user_agent=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&vendor_lead_id=44094188&url=http%3A%2F%2Fcontractorhomequotes.com&zip=35222&legal_lead_type=1&du_how_financing=4&du_accident_injury=0&du_challenge_dui=1&du_challenge_suspension=1&du_prior_dui=0&du_other_tickets=0&du_need_license=1&confirmation_id=12345&first_name=John&last_name=Smith&email=test%40test.com&address=123+High+Street&primary_phone=6105551212

Back to contents




Post Responses

This is exact text that will definitely be present.
This indicates variable data, or nodes that may or may not be present.

Accept:

NOTE: An 'Accept' response on the POST indicates we HAVE purchased the lead. The 'Response' tag will always contain 'Accepted', but the 'Confirmation' code and the 'Price' will differ for each response.

<PostResponse>
<Response>Accepted</Response>
<Confirmation>12345678901</Confirmation>
<Price>6.00</Price>
</PostResponse>

Reject:

NOTE: There are many reasons why we might reject a post - below you will see all the possible rejection responses. The 'Response' tag will always contain 'Rejected', and the 'Price' will always be '0.00'. The 'Confirmation' code will differ for each response.

For rejected responses, we also add two extra tags: 'Reason' tells you why the lead was rejected, and 'Message' gives some more descriptive text.

Also, where 'Reason' is 'Errors Detected', we add an 'Errors' section with a separate 'Error' node for each error - see the example below! This is designed to help you troubleshoot and fix any errors found.

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Unable to Monetize</Reason>
<Message>All buyers rejected this lead (IF POSSIBLE, WE WILL ATTEMPT TO EXPLAIN WHY HERE)</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Unable to Monetize</Reason>
<Message>Bids do not meet minimum_price requirement</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Maintenance Mode</Reason>
<Message>Our system is currently in maintenance mode</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Post data is empty</Reason>
<Message>Please check your integration</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid Confirmation ID</Reason>
<Message>You have passed a confirmation_id which is invalid</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid lead_type</Reason>
<Message>Please pass a valid lead_type as per our specs</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid lead_type for this vendor_id</Reason>
<Message>You are not currently approved to send leads of the given lead_type</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid lead_mode</Reason>
<Message>Please ensure lead_mode is either '0' for TEST or '1' for LIVE</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Invalid vendor_id</Reason>
<Message>Please check the vendor_id is correct</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Provided vendor_id is in TEST MODE</Reason>
<Message>Please contact us if you believe your account should be in LIVE MODE</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Daily Cap Exhausted</Reason>
<Message>Please contact us to increase your daily cap</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Per Minute Cap Exhausted</Reason>
<Message>Please contact us to increase your per minute cap</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Errors Detected</Reason>
<Message>The following errors were detected in this lead:</Message>
<Errors>
<Error>1</Error>
<Error>2</Error>
<Error>3</Error>
</Errors>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Duplicate Lead</Reason>
<Message>Lead was identified as a duplicate in our system</Message>
</PostResponse>

<PostResponse>
<Response>Rejected</Response>
<Confirmation>12345678901</Confirmation>
<Price>0.00</Price>
<Reason>Blacklisted Data</Reason>
<Message>The lead matches data on our internal blacklist - please investigate the lead source</Message>
</PostResponse>

Back to contents




Sample Post Code

Here is some sample PHP code to help you create your call to our API. This is simple stuff, so you should be able to readily convery it into another programming language if necessary.

$apiUrl = 'https://api.astoriacompany.com/v2/post/';
$headers = array('Content-Type: application/x-www-form-urlencoded');

$request = 'lead_type=21&lead_mode=0&vendor_id=76&sub_id=6&tcpa_optin=1&tcpa_text=By+submitting+this+form...&universal_leadid=1C5E08AC-C604-ADC6-CD3A-85C6E721CFE6&origination_datetime=2019-09-21+06%3A40%3A03&origination_timezone=1&ipaddress=35.175.191.150&user_agent=CCBot%2F2.0+%28https%3A%2F%2Fcommoncrawl.org%2Ffaq%2F%29&vendor_lead_id=44094188&url=http%3A%2F%2Fcontractorhomequotes.com&zip=35222&legal_lead_type=1&du_how_financing=4&du_accident_injury=0&du_challenge_dui=1&du_challenge_suspension=1&du_prior_dui=0&du_other_tickets=0&du_need_license=1&confirmation_id=12345&first_name=John&last_name=Smith&email=test%40test.com&address=123+High+Street&primary_phone=6105551212';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);

$response = curl_exec($ch);
curl_close($ch);

Back to contents




Common Mistakes

  • Values must be URL encoded. For example, james.doe@example.com should be james.doe%40example.com and 4 Pennsylvania Plaza should be 4+Pennsylvania+Plaza.
  • All field names and explicitly allowed values (employment_in_month, is_rented, income_payment_type, etc.) are case-sensitive.
  • Passing unlisted values (for example: family for reference_relationship1) will result in errors. Likewise, do not pass empty fields; instead omit the fields.
  • Out-of-range or logically impossible values, like stay_in_month=100, or stay_in_year=100 when dob=1980, will fail.
  • Remember to set lead_mode=1 when you go live!

Back to contents




Testing

For testing, i.e. when lead_mode=0, please attempt at least three different leads, each with a different zip code. One should end with and even number, one should end with an odd number, and one should end with a 0 (zero). The responses generated will vary based on the zip code used, as follows:

  • If you PING a test lead with a zip code that ends with a ZERO (e.g. 19460), you will receive the 'No Coverage' response, i.e. it will be REJECTED on the PING.
  • If you PING a test lead with a zip code that ends with an ODD number (e.g. 19461), you will receive a bid, i.e. it will be ACCEPTED on the PING. When you POST that same lead to us, it will be REJECTED on the POST.
  • If you PING a test lead with a zip code that ends with an EVEN number (e.g. 19462), you will receive a bid. When you POST that same lead to us, it will be ACCEPTED on the POST.

Please email all of the ping and post requests AND their corresponding responses to tech@astoriacompany.com so that we can verify the tests and activate your account.

Testing via a Third Party Service

If you are having issues getting the response you expect, please use hurl.it or a similar service to hit our API with the following settings (refer to this image):

  1. Go to: hurl.it
  2. Select 'POST' in the first dropdown
  3. For the URL, enter: https://api.astoriacompany.com/v2/ping/ (or https://api.astoriacompany.com/v2/post/ if testing a post)
  4. Add a Header: 'Content-Type' with a value of 'application/x-www-form-urlencoded'
  5. Paste your ping or post request into the 'Parameters' text area
  6. Click: Launch Request

Back to contents