API - Custom Integration
It is possible to register your own custom API, which will enable you to export companies from Lasso to your own system and to receive updates as they happen. It works by configuring two endpoints; one for exporting and one for updating. Everything you export from Lasso will be automatically monitored, and updates will be delivered if you have configured an Update-endpoint
.
If you use services such as Zapier or IFTTT, this is also how you would use that.
How it works
When you register your endpoints and configure your mappings, you will be able to choose API
from your export options, which will trigger a POST
or PUT
message to your Export-endpoint
. This message will contain a simple JSON message such as this:
{
"cvr": 34580820,
"name": "LASSO X A/S",
"telephone": "+45 71 74 78 12"
}
Which fields the message contains depends on the mappings you configure. The name used will be the name in parantheses in your mapping editor. The same message is sent on updates, but only the fields marked as Update will be included.
Get Started
To add your custom integration, go to Account Settings
> Integrations
> Add Integration
and choose Eget API
. You will be prompted to add your Export-endpoint
and Update-endpoint
, as well as security credentials for your endpoints. Note that the Update-endpoint is optional, but will of course mean you will not receive updates. Should you add this endpoint at a later point, all previously exported companies will still be monitored.
Once you have configured your endpoints and security details, the fields you wish to receive must be mapped. The name used in the JSON message will be the name included in parantheses.
Endpoint HTTP response codes
We expect your endpoints to return HTTP Status codes of either 200 OK
or 201 No Content
to indicate a succesful delivery. In addition, 409 Conflict
will be regarded as duplicate-rejection when exporting, and 404 Not Found
will be understood as if the company no longer exists in your system when updating. We also plan to support 429 Too Many Requests
to indicate that our services should wait a little before trying the request again, but this is currently not implemented. All other response codes will result in up to three attempts to deliver the message, after which it will fail and inform you by e-mail.