Leads - Temporary users
A Leads partnership allows an organization to create temporary users. These users may be granted access to the products Leah offers.
Permissions are granted when user is created. The organization defines the products to which it will grant access and how many uses are allowed. Afterwards, the user can go to Leah Web and take the tests that are enabled.
Users are temporary, therefore, once they consume all permissions, their personal information will be deleted from Leah. To persist important user data and test results, an integration via webhooks should be implemented as an add-on.
The creation of users is done through the leads API.
Leads API
To use the leads API, a secret key and an identifier known as "partnerId" are required. This data is provided by the Leah developer or agent who manages the agreement.
Once you have the credentials (staging or production), you can proceed to use the API. The swagger documentation for the leads API can be found at the following link:
- Staging
- Production
Swagger documentation: https://staging.api.leahapp.com/leads/docs
Swagger documentation: https://api.leahapp.com/leads/docs
In the swagger documentation, all mandatory fields and expected behaviors are specified according to the data that can be send. It is recommended to carefully read the information in each field on each endpoint.
Temporary users flow
The flow of temporary users starts from when they are created through the API, until they are deleted once they finish their active exams.
For example, in a scenario where an organization obtains leads through a website and grants them access to Leah's tests, the flow would look like this:
Note how integration via webhooks is required to receive user results.