Customer API
An administrator account is needed in order to access this information. If you are not an administrator in OneLink please reach out to your OneLink administrator. Always check with your OneLink Administrator before making changes to the OneLink account.
Introduction
OneLink uses API keys for authentication. You can generate a OneLink API key in the integration section of your company setup
-
Login to your OneLink account
-
In the menu click > Utilities > Company Setup
-
Click the edit icon for your company
-
Click intergration
-
Next to API Keys click the + button to create an API Key
This API allows you to perform CRUD operations on customer data, including creating, reading, updating, and deleting customers.
Base URL
The base URL for all requests is: https://intruity.com/api/customers
Authentication
Bearer Tokens
- The OneLink API uses Bearer Authentication for authentication.
You must include an API key in each request to the OneLink API with the Authorization request header.
Authentication error response
If an API key is missing, malformed, or invalid, you will receive an HTTP 401 Unauthorized response code.
Missing Token
Invalid/revoked token
Token {{Key}}
Errors
This API uses standard HTTP status codes to indicate the success or failure of a request. If a request fails, the response will include a JSON object with an error property describing the error.
Endpoints
GET / https://api.intruity.com/customer/:id -This endpoint allows you to retrieve a single customer.
POST /Add/ https://api.intruity.com/customer/add - Creates a new customer
POST /update/{id}/ https://api.intruity.com/customer/update - Updates the customer with the specified id
DELETE /delete/{id}/ https://api.intruity.com/customer/:id - Deletes the customer with the specified id
GET /
EndPoint: https://api.intruity.com/customer/:id
A GET request to /customer/:id will retrieve details about a specific customer
Path Variables:
Id {{customer}}
POST / Add
EndPoint: https://api.intruity.com/customer/add
Creates a new customer.
The following fields are required to create customers:
firstName, lastName, employeeId, leadSourceId
And at least one of the following fields are additionally required:
businessPhone, homePhone, mobilePhone, or email
Request example:
{
"customer": {
"Employee_ID": 10,
"Customer_Status_ID": 8,
"Lead_Source_ID": 1
}
}
Example Responce:
200 OK "Customer_ID": 5555
POST /update
EndPoint: https://api.intruity.com/customer/update
Updates the customer with the specified id
The following fields are required to update customers:
customerId
Request example:
{
"Customer_Id": 222,
"Customer" : {
"First_Name": "john"
}
}
Delete Customer
EndPoint: https://api.intruity.com/customer/:id
Deletes the customer with the specified id
The following fields are required to delete customers:
customerId
Customer Headers
create table Customer
(
Home_Address1 nvarchar(255),
Attachments nvarchar(max),
Business_Phone nvarchar(25),
Home_City nvarchar(50),
Company nvarchar(50),
Email nvarchar(50),
Fax nvarchar(25),
First_Name nvarchar(50),
Home_Phone nvarchar(25),
Customer_ID int identity
Job_Title nvarchar(50),
Last_Name nvarchar(50),
Mobile_Phone nvarchar(25),
Notes nvarchar(max),
Home_State nvarchar(2),
Web_Page nvarchar(max),
Home_Zip nvarchar(5),
Employee_ID int default 1 not null,
Home_Address2 nvarchar(255),
Business_Address1 nvarchar(255),
Business_Address2 nvarchar(255),
Business_City nvarchar(50),
Business_State nvarchar(2),
Business_Zip nvarchar(5),
Middle_Name nvarchar(50),
Lead_Source_ID int
constraint DF__Customer__Lead_S__318258D2 default 1 not null,
Create_Date datetime default getdate(),
Timestamp datetime default getdate() not null,
Lead_ID int,
External_ID nvarchar(50),
Custom_Text_1 nvarchar(100),
Custom_Text_2 nvarchar(100),
Custom_Text_3 nvarchar(100),
Custom_Text_4 nvarchar(100),
Custom_Text_5 nvarchar(100),
Custom_Text_6 nvarchar(100),
Custom_Text_7 nvarchar(100),
Custom_Text_8 nvarchar(100),
Custom_Text_9 nvarchar(100),
Custom_Text_10 nvarchar(100),
Do_Not_Email bit
constraint DF_Customer_Do_Not_Email default 0 not null,
Email_Unsubscribe_Datetime datetime,
Book_Roll_From_Employee_ID int,
Book_Roll_ID int,
Customer_Status_ID int, Customer_Status_Change_Datetime datetime,
Last_Updated datetime,
Nickname nvarchar(50),
DOB datetime,
Mailing_Address1 nvarchar(100),
Mailing_Address2 nvarchar(100),
Mailing_City nvarchar(50),
Mailing_State nvarchar(2),
Mailing_Zip nvarchar(10),
Same_As_Home_Address bit default 1 not null,
Stripe_Identifier nvarchar(50)
)