Lead Creation using the Laminin API

Created by Etienne Marais, Modified on Fri, 25 Oct, 2024 at 3:17 PM by Etienne Marais

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:

 

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:

Graphical user interface, text, application 
Description automatically generated

  

 


Transaction Response

Upon successful submission a JSON object will be returned with 3 parameters:

  1. Success: True or False
  2. NewLeadId: Unique lead ID in Laminin
  3. 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:

Application 
Description automatically generated with low confidence

 

 


 

For any questions or additional support, please mail our team at support@lamin.in

When logging a ticket with the Laminin support team, please provide as much information as possible. This can include references to specific leads or recordings as well as descriptions and screenshots of your own troubleshooting.

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