Lead INJEctor (Linje) is an API, used in OCC version 3.4 and onwards, for importing leads or customers and manage or call them quickly. Before “Linje” can be used, our Service Center must first do some preparations, settings and grant you access by giving you the tokens required to send data to the API.
There are right now no traffic rate limitations, but this can change with future updates.
The Linje API can be reached at this address:
https://linje.loxysoft.net/api/v2/campaigns/{lead-token}/leads
In order to call the API, you will need two UUID’s that are provided to you by our Service Center.
- Access-token: Identifies which user is calling Linje-API
- Lead-token: Identifies which lead config, project and campaign to be used
Both are 36-character strings (upper/lower caps do not matter)
Structure
URL:
/api/v2/campaigns/{lead-token}/leads
Headers:
Content-Type: application/json; charset=utf-8
Authorization: {access-token}
Method:
POST
URL-parameters:
lead-token ex. F71E399F-EF04-45CD-8BAF-FB26920F3571
Data-parameters:
Data is posted using JSON utf-8. Linje-API will accept characters formatted as Basic Latin and Latin-1(ASCII and ISO 8859-1). The following fields can be submitted:
Field |
Required |
Type & Field length |
Description |
address |
- |
string(100) |
Shown in OCC prospect information |
city |
- |
string(50) |
Shown in OCC prospect information |
|
- |
string(100) |
Shown in OCC prospect information |
extra |
- |
object of key-value-pairs, type string(50) x string(500) |
Shown in OCC prospect information |
firstName |
- |
string(50) |
Shown in OCC prospect information |
lastName |
- |
string(50) |
Shown in OCC prospect information |
phoneNumber |
Required |
string(30) |
Must be E. 164 format (ex. +46890510) |
postCode |
- |
string(8) |
Shown in OCC prospect information |
socIdNumber |
- |
string(100) |
Shown in OCC prospect information |
source |
- |
string(100) |
Shown in OCC prospect information |
Answers
Code |
Results |
Explanation |
204 |
Success |
Lead successfully imported. |
301 |
Moved permanently |
This could mean that “http” was used instead of “https”. |
400 |
Bad Request |
Erroneous or missing data. See status body for more information. |
401 |
Unauthorized |
Access- or Lead-token is unauthorized. Check your tokens |
415 |
Unsupported Media Type |
Make sure you’ve added “charset=utf-8” to the Content-Type header. |
503 |
Lead injector temporarily unavailable |
System is at the moment unavailable. Please try again later. This is most common at night as maintenance can bring the system down for a couple of minutes, but could occur at any hour. |
Example:
Post:
https://linje.loxysoft.net/api/v2/campaigns/87654321-DCBA-21BA-1234-98765432DCBA/leads
Header:
Content-Type: application/json; charset=utf-8
Authorization: 12345678-ABCD-12AB-AB12-123456ABCDEF
Request body:
{
"phoneNumber": "+468999999",
"firstName": "Donald",
"lastName": "Duck",
"address": "Webfoot Walk 1313",
"postCode": "12345",
"city": "Duckburg",
"socIdNumber": "19340101",
"source": "Source description",
"extra": {
"relative": "Uncle Scrooge",
"key": "some value"
}
}