Laminin exposes a RESTful API endpoint that can be used to add leads to the Laminin platform by external lead sources such as a contact form on your company website using the POST HTTP method. This article will go into the detail of getting leads from various sources into the Laminin platform.
Please note this document uses examples of the non-production environment of Laminin.
Production credentials and endpoints will be supplied upon request.
Endpoint & Header
The following URL can be used to create leads in Laminin systematically:
- https://dev-extapi.lamin.in/api/web-hooks/create-lead/{campaignId}
- The {campaignId} is configured in the Laminin instance and is part of the campaign setup
- The {campaignId} for the non-prod environment = 114
The Header must have a key value pair for authentication where the value is the API Key:
- Key: X-Laminin-Client-ID
- Value: {apiKey} to be provided by Laminin
Header Postman Example:
Transaction Payload
The payload is a JSON object with key value pairs. The campaign fields can be customised according to the lead source or operational requirements. As an example the destination campaign in non-prod can receive:
- IdNumber: Mandatory Field.
- FirstName: Optional Field.
- LastName: Mandatory Field.
- MobilePhone: Mandatory Field.
- AlternatePhone: Optional Field.
- Email: Optional Field.
JSON Example:
{
"IdNumber": "7812110000080"
"FirstName": "Wade",
"LastName": "Wilson",
"MobilePhone": "0812345678",
"AlternatePhone": "0100546546",
"Email": "wade@dead.pool"
}
Please note that the field keys are case sensitive and must correspond 100% to the field keys on Laminin; i.e.: FirstName cannot be Firstname or First_Name.
Payload Postman Example:
Transaction Response
Upon successful submission a JSON object will be returned with 3 parameters:
- Success: True or False
- NewLeadId: Unique lead ID in Laminin
- Message: Contains information upon unsuccessful transaction. Some exceptions are:
- “Object reference not set to an instance of an object” – If incorrect {apiKey} is passed in the Header field
- “Could not find campaign with Id: xxx” – Incorrect {campaignId} is passed to the endpoint
- “Invalid Arguments: Lead requires field with Key: xxx” – Mandatory field key such as LastName not specified or omitted
- “Invalid Arguments: Field with Key: xxxx cannot be empty” – Mandatory field such as LastName does not contain a value
Response Postman Example:
For any questions or additional support, please mail our team at support@lamin.in
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