Housing- Push Integration

Modified on Tue, 31 Oct, 2023 at 12:52 PM

Navigate to:

1. Introduction

2. Integration

3. Verification


1. Introduction

Welcome to the official documentation for ANAROCK Portal API! 


You can use this set of APIs for pushing leads to the host (passed with request object) database.




2. Integration

Housing will be going to share the following details with the ANAROCK CRM SPOC

- project_name

- project_id


ANAROCK CRM SPOC will provide the api_key & parameters for the integration.



Route: 

https://marketing.anarock.com/api/v0/:channel/push-lead?api_key=:api_key


POST request


Body : 

{
   "api_key": "Your Key here", // Provided by the Anarock Team or Support@anarock.com
   "channel": "portal name" // Please select from below table
   "name": "Rahil Shah",
   "email": "support@anarock.com",
   "phone": "8097974250",
   "country_code": "91",
   "project_name": "Adani Western Heights",
   "project_id": "59679995",
   "city": "Mumbai",
   "locality": "Jawahar Nagar",
   "min_budget": 10000000,
   "max_budget": 11000000,
   "remarks": "This user is looking for 3 BHK Multistorey Apartment for Sale in Goregaon West, Mumbai and has viewed your contact details.",
}


Channel Details:

IDPortalsChannels
1Housing
housing



Params:

ParamTypeSample ValueMandatory Description
api_keyString
1mLD91P5cj0r1wUGrB0Wi67xRx6QpYkN_uEBJU4c9qeY
True

Separate API Key for different clients and projects provided by anarock team

channelString
housingTrueSource of inquiry
phoneString
8097974245
TruePhone Number of the person inquiring. Can be with or without country_code. If without country_code in phone then need to provide country_code
country_codeString
91TruePhone Number country code
nameString
Rahil Shah
Lead/Client Name
emailString
support@anarock.com
Email of the person inquiring
project_nameStringAdani Western Heights

Listing project name
project_idString

59679995


Listing project id
cityStringMumbai
City of the inquiry
localityString
Jawahar Nagar
Locality of the inquiry
min_budgetInteger10000000
Minimum budget of the person inquiring
max_budgetInteger15000000

Maximum budget of the person inquiring
remarksStringThis user is looking for 3 BHK Multistorey Apartment for Sale in Goregaon West, Mumbai and has viewed your contact details.

Comments/Messages of the user if any


Response: 

Status Code

Response

Message

400

Failure

{

"api_key": "APIKey Missing",

"phone": "Phone Missing",

"channel": "Channel Missing"

}

400

Failure

{

"phone": "Invalid phone"

}

403

Failure

"Invalid api_key"

500

Failure

"Something went wrong"

200

Success

"Successfully added lead to the system"

200

Success

"Failed adding lead to the system"



3. Integration Verification

Integration needs to be verified with the below cURL once it is completed for the respective client.


I. Open the Command Line Prompt (Windows OS).

- Click on the search option in the search window.

- Type ‘command line prompt & hit enter.

- Command Prompt will open as shown in the below screenshot.


II. In the cURL mentioned below, update the api_key in the URL section of cURL.


III. Copy the updated cURL & paste it to the Command Line prompt and hit enter.


- Housing cURL

curl --location --request POST 'https://marketing.anarock.com/api/v0/housing/push-lead?api_key=your_API_Key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Rahil Shah",
    "email": "rahil.shah1@anarock.com",
    "country_code": "91",
    "phone": "8097974258",
    "project_name": "Adani Western Heights",
    "project_id": "59679995",
    "city": "Mumbai",
    "locality": "Jawahar Nagar",
    "min_budget": 10000000,
    "max_budget": 11000000,
    "remarks": "This user is looking for 3 BHK Multistorey Apartment for Sale in Goregaon West, Mumbai and has viewed your contact details."
}'


IV. Check the message whether the integration is a success or a failure.


V. If the response fails, verify the reasons below.


Failure Reasons:


- Invalid api_key: Check whether the Google Sheet ID is correct and is added to both the Master Sheet and the client’s URL you created.


- Something went wrong: Check if the Google Sheet ID is correct and editor access is given to the email present in the document.


- Failed adding lead to the system: Check the default campaign, tenant, and apikey on the Google master sheet.


- Successfully added lead to the system: Everything is correct and good to go.


VI. If the response succeeds, check the lead in the system.




For any support on our products, please reach out to support@anarock.com


For any feedback, please reach out to tech-feedback@anarock.com

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article