Navigate To:
- Testing
2. Common Errors While Landing Page Form Integration Using API
1. Server-Side Integration
Step 1: Authentication
For integrating the landing page form through API, you have to first share the API key in the hash by encrypting it using time_stamp for authentication. You can click this link to check the code script available in PHP, NodeJS, & Ruby.
Note: - The API key will be provided by your POC at the Anarock team - Don’t forget to replace KEY with your API Key. |
Step 2: Lead Synchronisation
You can call our API directly through the server by providing a hash. You can copy the code script from the ‘Sync Lead’ section of this link to post the lead to the Anarock database.
You can choose any of the provided parameters from the ‘Query Parameter’ section to add any extra details that you want to send to the server.
Step 3: Testing
Check successful lead submission with all the parameters using the following ‘GET API’:
https://lead.<HOST>/api/v0/CHANNEL_NAME/last-lead-data?phone=PHONE_NUMBER¤t_time=CURRENT_TIME&hash=HASH
2. Best Practices To Avoid Common Errors While Landing Page Form Integration Using API
- Make sure mapping details are correct.
- Ensure that authentication or hashing is done correctly.
- Always add the correct API key (auth keys), campaign id, & channel_name provided by the Anarock team.
- Auth keys are environment-specific: Make sure you are using Production KEY in the Production environment.
- Avoid any mismatched key values.
Still, finding it difficult? Connect with our team to understand the whole process.
3. Integration Response
Status Code | Response | Message |
400 | Failure | Invalid phone number Error: “Bad Request” |
400 | Failure | Invalid key and channel combination! Error: “Bad Request” |
400 | Failure | Invalid request- Mandatory key ‘Purpose’ missing Error: “Bad request” |
400 | Failure | Invalid request- max_budget should be greater than min_budget Error: “Bad request” |
401 | Failure | Authentication Failed |
403 | Failure | Invalid API Key |
500 | Failure | Server Error |
200 | Success | Successfully added lead to the system |
200 | Success | Failed adding lead to the system |
For any support on our products, please reach out to [email protected]
For any feedback, please reach out to [email protected]
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article