Appearance
Events
APIs for tracking events in your Lindris account.
As a reminder, all requests must be authenticated and use the base URL: https://api.lindris.com
Track a generic custom event
POSTapi/eventsRequest Body
eventNamestring required - Event name to be tracked. Example:clicked_home_ctaemailstring optional - The person's email address. Either email or referenceId must be provided.referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The e-commerce/platform source. Example:woocommercepropertiesstring[] optional - A key-value pair of event properties to be tracked.silentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"eventName\": \"clicked_home_cta\",
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"woocommerce\",
\"properties\": null,
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'eventName' => 'clicked_home_cta',
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'woocommerce',
'properties' => null,
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"eventName": "clicked_home_cta",
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "woocommerce",
"properties": null,
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"eventName": [
"The event name field is required."
],
"source": [
"The source field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}Track a cart event
POSTapi/events/cart/{action}For tracking cart lifecycle events
URL Parameters
actionstring required - The cart event action to track. Example:created- Must be one of:
createdupdatedabandoned
- Must be one of:
Request Body
emailstring optional - The person's email address. Either email or referenceId must be provided.referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The e-commerce platform source. Example:woocommerceidmixed optional - The unique identifier for the cart, usually a cart session ID or similar. Numeric values will be cast to strings. Example:cart_123456occurredAtstring optional - The timestamp when this action occurred. Example:2024-03-21T15:30:00Zproductsobject[] optional - The products in the cart.Item
*object Propertiesidmixed required - The unique identifier for the product. Numeric values will be cast to strings. Example:prod_123namestring required - The name of the product. Example:Awesome T-Shirturlstring optional - A URL to the site containing the product details.- Example:
https://store.example.com/products/awesome-tshirt
- Example:
image_urlstring optional - A direct URL to an image of the product.- Example:
https://store.example.com/images/awesome-tshirt.jpg
- Example:
skustring optional - The SKU for the product. Example:TSH-001variant_idmixed optional - The unique identifier for the variant of the product. Numeric values will be cast to strings. Example:var_123brandstring optional - The brand name for the product. Example:Awesome Brandpricenumber optional - The price of the product. Example:29.99quantityinteger optional - The quantity of the product. Example:2totalnumber optional - The line item total after all calculations. Example:59.98discountsnumber optional - The total discounts applied to this product. Example:10taxesnumber optional - The total taxes for this product. Example:5feesnumber optional - The total fees for this product. Example:2shippingnumber optional - The total shipping for this product. Example:5
totalnumber optional - The total value of the cart. Example:59.98total_productsinteger optional - The total number of products in the cart. Example:2urlstring optional - The URL of the cart.- Example:
https://store.example.com/cart
- Example:
currencystring optional - The currency code (ISO 4217). Example:USDmodified_atstring optional - When the cart was last modified. Example:2024-03-21T15:30:00Zsilentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no cart event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events/cart/created" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"woocommerce\",
\"id\": \"cart_123456\",
\"occurredAt\": \"2024-03-21T15:30:00Z\",
\"total\": 59.98,
\"total_products\": 2,
\"url\": \"https:\\/\\/store.example.com\\/cart\",
\"currency\": \"USD\",
\"modified_at\": \"2024-03-21T15:30:00Z\",
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events/cart/created';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'woocommerce',
'id' => 'cart_123456',
'occurredAt' => '2024-03-21T15:30:00Z',
'total' => 59.98,
'total_products' => 2,
'url' => 'https://store.example.com/cart',
'currency' => 'USD',
'modified_at' => '2024-03-21T15:30:00Z',
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events/cart/created"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "woocommerce",
"id": "cart_123456",
"occurredAt": "2024-03-21T15:30:00Z",
"total": 59.98,
"total_products": 2,
"url": "https:\/\/store.example.com\/cart",
"currency": "USD",
"modified_at": "2024-03-21T15:30:00Z",
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"source": [
"The source field is required."
],
"id": [
"The id field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}Track a product event
POSTapi/events/product/{action}For tracking product lifecycle events
URL Parameters
actionstring required - The product event action to track. Example:viewed- Must be one of:
viewedcreatedupdateddeleted
- Must be one of:
Request Body
emailstring optional - The person's email address. Either email or referenceId must be provided.referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The e-commerce platform source. Example:woocommerceidmixed required - The unique identifier for the product. Numeric values will be cast to strings. Example:prod_123456modified_atstring optional - The timestamp when this product was last modified. Example:2024-03-21T15:30:00Zcreated_atstring optional - The timestamp when this product was created. Example:2024-03-21T15:30:00Znamestring optional - The name of the product. Example:Awesome T-Shirtdescriptionstring optional - The description of the product.- Example:
A really awesome t-shirt
- Example:
urlstring optional - The URL of the product.- Example:
https://store.example.com/products/awesome-tshirt
- Example:
image_urlstring optional - The URL of the product image.- Example:
https://store.example.com/images/awesome-tshirt.jpg
- Example:
pricenumber optional - The price of the product. Example:29.99skustring optional - The SKU of the product. Example:TSH-001barcodestring optional - The barcode of the product. Example:123456789categoriesstring[] optional - The categories of the product.- Example:
[ "Clothing", "T-Shirts" ]
- Example:
tagsstring[] optional - The tags of the product.- Example:
[ "summer", "sale" ]
- Example:
vendorstring optional - The vendor/manufacturer of the product. Example:Awesome Brandtypestring optional - The type of the product. Example:T-Shirtbrandstring optional - The brand of the product. Example:Awesome Brandpublic_idstring optional - The public ID of the product. Example:prod_123456variant_idstring optional - The variant ID of the product. Example:var_123variantsobject[] optional - The variants of the product.Item
*object Propertiesidmixed required - The unique identifier for the variant. Numeric values will be cast to strings. Example:var_123skustring optional - The SKU for this variant. Example:TSH-001-Lpricenumber optional - The price for this variant. Example:29.99barcodestring optional - The barcode for this variant. Example:123456789-Loptionsstring[] optional - The options that define this variant.
currencystring optional - The currency code (ISO 4217). Example:USDsilentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no product event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events/product/viewed" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"woocommerce\",
\"id\": \"prod_123456\",
\"modified_at\": \"2024-03-21T15:30:00Z\",
\"created_at\": \"2024-03-21T15:30:00Z\",
\"name\": \"Awesome T-Shirt\",
\"description\": \"A really awesome t-shirt\",
\"url\": \"https:\\/\\/store.example.com\\/products\\/awesome-tshirt\",
\"image_url\": \"https:\\/\\/store.example.com\\/images\\/awesome-tshirt.jpg\",
\"price\": 29.99,
\"sku\": \"TSH-001\",
\"barcode\": \"123456789\",
\"categories\": [
\"Clothing\",
\"T-Shirts\"
],
\"tags\": [
\"summer\",
\"sale\"
],
\"vendor\": \"Awesome Brand\",
\"type\": \"T-Shirt\",
\"brand\": \"Awesome Brand\",
\"public_id\": \"prod_123456\",
\"variant_id\": \"var_123\",
\"currency\": \"USD\",
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events/product/viewed';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'woocommerce',
'id' => 'prod_123456',
'modified_at' => '2024-03-21T15:30:00Z',
'created_at' => '2024-03-21T15:30:00Z',
'name' => 'Awesome T-Shirt',
'description' => 'A really awesome t-shirt',
'url' => 'https://store.example.com/products/awesome-tshirt',
'image_url' => 'https://store.example.com/images/awesome-tshirt.jpg',
'price' => 29.99,
'sku' => 'TSH-001',
'barcode' => '123456789',
'categories' => [
'Clothing',
'T-Shirts',
],
'tags' => [
'summer',
'sale',
],
'vendor' => 'Awesome Brand',
'type' => 'T-Shirt',
'brand' => 'Awesome Brand',
'public_id' => 'prod_123456',
'variant_id' => 'var_123',
'currency' => 'USD',
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events/product/viewed"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "woocommerce",
"id": "prod_123456",
"modified_at": "2024-03-21T15:30:00Z",
"created_at": "2024-03-21T15:30:00Z",
"name": "Awesome T-Shirt",
"description": "A really awesome t-shirt",
"url": "https:\/\/store.example.com\/products\/awesome-tshirt",
"image_url": "https:\/\/store.example.com\/images\/awesome-tshirt.jpg",
"price": 29.99,
"sku": "TSH-001",
"barcode": "123456789",
"categories": [
"Clothing",
"T-Shirts"
],
"tags": [
"summer",
"sale"
],
"vendor": "Awesome Brand",
"type": "T-Shirt",
"brand": "Awesome Brand",
"public_id": "prod_123456",
"variant_id": "var_123",
"currency": "USD",
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"source": [
"The source field is required."
],
"id": [
"The id field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}Track an order event
POSTapi/events/order/{action}For tracking order lifecycle events
URL Parameters
actionstring required - The order event action to track. Example:created- Must be one of:
createdupdateddeletedcompleted
- Must be one of:
Request Body
emailstring optional - The person's email address. Either email or referenceId must be provided.referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The e-commerce/platform source. Example:woocommerceidmixed required - The unique identifier for the order. Numeric values will be cast to strings. Example:order_123456occurred_atstring optional - The timestamp when this action occurred. Example:2024-03-21T15:30:00Zproductsobject[] optional - The products in the order.Item
*object Propertiesidmixed required - The unique identifier for the product. Numeric values will be cast to strings. Example:prod_123namestring required - The name of the product. Example:Awesome T-Shirturlstring optional - A URL to the site containing the product details.- Example:
https://store.example.com/products/awesome-tshirt
- Example:
image_urlstring optional - A direct URL to an image of the product.- Example:
https://store.example.com/images/awesome-tshirt.jpg
- Example:
skustring optional - The SKU for the product. Example:TSH-001variant_idmixed optional - The unique identifier for the variant of the product. Numeric values will be cast to strings. Example:var_123brandstring optional - The brand name for the product. Example:Awesome Brandpricenumber optional - The price of the product. Example:29.99quantityinteger optional - The quantity of the product ordered. Example:2totalnumber optional - The line item total after all calculations. Example:59.98discountsnumber optional - The total discounts applied to this product. Example:10taxesnumber optional - The total taxes for this product. Example:5feesnumber optional - The total fees for this product. Example:2shippingnumber optional - The total shipping for this product. Example:5
currencystring optional - The currency code (ISO 4217). Example:USDpublicIdmixed optional - The customer-facing order ID. Numeric values will be cast to strings. Example:#1001totalnumber optional - The total value of the order. Example:99.99shippingnumber optional - The total shipping cost. Example:5.99discountsnumber optional - The total discounts applied. Example:10taxesnumber optional - The total taxes applied. Example:8.5feesnumber optional - The total fees applied. Example:2.5statusstring optional - The current status of the order. Example:completedurlstring optional - The public URL of the order details.- Example:
https://store.example.com/order/1001
- Example:
phonestring optional - The customer's phone number. Example:+1234567890billing_addressobject optional - The billing address details.labelstring optional - The label describing the billing address. Example:Homefirst_namestring optional - The first name on the billing address. Example:Johnlast_namestring optional - The last name on the billing address. Example:Doephonestring optional - The phone number on the billing address. Example:+1234567890companystring optional - The company on the billing address. Example:Acme Incaddress1string optional - The billing street address. Example:123 Main Staddress2string optional - Additional billing address line. Example:Suite 100citystring optional - The city on the billing address. Example:New Yorkstatestring optional - The state on the billing address. Example:NYpostal_codestring optional - The postal/zip code on the billing address. Example:10001countrystring optional - The country on the billing address. Example:US
shipping_addressobject optional - The shipping address details.labelstring optional - The label describing the shipping address. Example:Officefirst_namestring optional - The first name on the shipping address. Example:Johnlast_namestring optional - The last name on the shipping address. Example:Doephonestring optional - The phone number on the shipping address. Example:+1234567890companystring optional - The company on the shipping address. Example:Acme Incaddress1string optional - The shipping street address. Example:123 Main Staddress2string optional - Additional shipping address line. Example:Suite 100citystring optional - The city on the shipping address. Example:New Yorkstatestring optional - The state on the shipping address. Example:NYpostal_codestring optional - The postal/zip code on the shipping address. Example:10001countrystring optional - The country on the shipping address. Example:US
payment_gatewaystring optional - The payment gateway used. Example:stripe_lsstring optional - The revenue tracking hash.silentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no order event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events/order/created" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"woocommerce\",
\"id\": \"order_123456\",
\"occurred_at\": \"2024-03-21T15:30:00Z\",
\"currency\": \"USD\",
\"publicId\": \"#1001\",
\"total\": 99.99,
\"shipping\": 5.99,
\"discounts\": 10,
\"taxes\": 8.5,
\"fees\": 2.5,
\"status\": \"completed\",
\"url\": \"https:\\/\\/store.example.com\\/order\\/1001\",
\"phone\": \"+1234567890\",
\"billing_address\": {
\"label\": \"Home\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"phone\": \"+1234567890\",
\"company\": \"Acme Inc\",
\"address1\": \"123 Main St\",
\"address2\": \"Suite 100\",
\"city\": \"New York\",
\"state\": \"NY\",
\"postal_code\": \"10001\",
\"country\": \"US\"
},
\"shipping_address\": {
\"label\": \"Office\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"phone\": \"+1234567890\",
\"company\": \"Acme Inc\",
\"address1\": \"123 Main St\",
\"address2\": \"Suite 100\",
\"city\": \"New York\",
\"state\": \"NY\",
\"postal_code\": \"10001\",
\"country\": \"US\"
},
\"payment_gateway\": \"stripe\",
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events/order/created';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'woocommerce',
'id' => 'order_123456',
'occurred_at' => '2024-03-21T15:30:00Z',
'currency' => 'USD',
'publicId' => '#1001',
'total' => 99.99,
'shipping' => 5.99,
'discounts' => 10.0,
'taxes' => 8.5,
'fees' => 2.5,
'status' => 'completed',
'url' => 'https://store.example.com/order/1001',
'phone' => '+1234567890',
'billing_address' => [
'label' => 'Home',
'first_name' => 'John',
'last_name' => 'Doe',
'phone' => '+1234567890',
'company' => 'Acme Inc',
'address1' => '123 Main St',
'address2' => 'Suite 100',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US',
],
'shipping_address' => [
'label' => 'Office',
'first_name' => 'John',
'last_name' => 'Doe',
'phone' => '+1234567890',
'company' => 'Acme Inc',
'address1' => '123 Main St',
'address2' => 'Suite 100',
'city' => 'New York',
'state' => 'NY',
'postal_code' => '10001',
'country' => 'US',
],
'payment_gateway' => 'stripe',
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events/order/created"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "woocommerce",
"id": "order_123456",
"occurred_at": "2024-03-21T15:30:00Z",
"currency": "USD",
"publicId": "#1001",
"total": 99.99,
"shipping": 5.99,
"discounts": 10,
"taxes": 8.5,
"fees": 2.5,
"status": "completed",
"url": "https:\/\/store.example.com\/order\/1001",
"phone": "+1234567890",
"billing_address": {
"label": "Home",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890",
"company": "Acme Inc",
"address1": "123 Main St",
"address2": "Suite 100",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
},
"shipping_address": {
"label": "Office",
"first_name": "John",
"last_name": "Doe",
"phone": "+1234567890",
"company": "Acme Inc",
"address1": "123 Main St",
"address2": "Suite 100",
"city": "New York",
"state": "NY",
"postal_code": "10001",
"country": "US"
},
"payment_gateway": "stripe",
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"source": [
"The source field is required."
],
"id": [
"The id field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}Track a customer event
POSTapi/events/customer/{action}For tracking customer lifecycle events
TIP
The Customer Events API is distinct from the People API.
- Customer Events API: Used to track customer lifecycle events (creation, updates, deletion) that occur in your own e-commerce system
- People API: Used to manage contacts (create, update, delete) directly in your Lindris account
For example:
- When a customer creates an account in your WooCommerce store, you would track this using the Customer Events API
- When you want to manually add or update a contact in Lindris, you would use the People API
The Customer Events API helps maintain a history of customer activities in your system, while the People API manages the actual contact records in Lindris.
URL Parameters
actionstring required - The customer event action to track. Example:created- Must be one of:
createdupdateddeleted
- Must be one of:
Request Body
emailstring optional - The person's email address. Either email or referenceId must be provided.referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The e-commerce platform source. Example:woocommerceidmixed required - The unique identifier for the customer. Numeric values will be cast to strings. Example:cust_123456is_contactboolean optional - If true, the customer event data will be used to create or update a contact. When set to true, relevant customer fields (firstName, lastName, address, etc.) will be automatically mapped to contact fields in Lindris. This allows you to sync customer data from your e-commerce platform to Lindris contacts without making separate API calls. For existing contacts, only fields that are provided will be updated, and the source field will not be overwritten if it already exists.first_namestring optional - Customer's first name. Example:Johnlast_namestring optional - Customer's last name. Example:Doenamestring optional - Full name of the customer. Example:John Doecustomer_emailstring optional - Customer's email address (can differ from identifying email). Example:[email protected]statusstring optional - Customer account status. Example:activecreated_atstring optional - When the customer was created. Example:2024-03-21T15:30:00Zmodified_atstring optional - When the customer was last modified. Example:2024-03-21T15:30:00Zuser_idmixed optional - User ID in the source system. Numeric values will be cast to strings. Example:user_123purchase_countinteger optional - Number of purchases made by the customer. Example:5purchase_valuenumber optional - Total value of all purchases. Example:299.95phonestring optional - Customer's phone number. Example:+1-555-123-4567urlstring optional - URL to the customer's profile.- Example:
https://store.example.com/customers/123
- Example:
avatar_urlstring optional - URL to the customer's avatar/profile image.- Example:
https://store.example.com/avatars/john-doe.jpg
- Example:
currencystring optional - Currency code for monetary values. Example:USDpayment_gatewaystring optional - Payment gateway used by the customer. Example:stripepublic_idmixed optional - Public identifier for the customer. Numeric values will be cast to strings. Example:pub_123456crmstring optional - Customer management system the customer was created in. Example:woocommerceaddressstring[] optional - Customer's primary address details.labelstring optional - The label describing the address. Example:Homefirst_namestring optional - The first name on the address. Example:Johnlast_namestring optional - The last name on the address. Example:Doephonestring optional - The phone number on the address. Example:+1-555-123-4567companystring optional - The company on the address. Example:Acme Inc.address1string optional - The street address. Example:123 Main Staddress2string optional - Additional address line. Example:Apt 4Bcitystring optional - The city on the address. Example:New Yorkstatestring optional - The state/province on the address. Example:NYpostal_codestring optional - The postal/zip code on the address. Example:10001countrystring optional - The country on the address. Example:US
billing_addressstring[] optional - Customer's billing address details.labelstring optional - The label describing the billing address. Example:Billingfirst_namestring optional - The first name on the billing address. Example:Johnlast_namestring optional - The last name on the billing address. Example:Doephonestring optional - The phone number on the billing address. Example:+1-555-123-4567companystring optional - The company on the billing address. Example:Acme Inc.address1string optional - The billing street address. Example:123 Main Staddress2string optional - Additional billing address line. Example:Apt 4Bcitystring optional - The city on the billing address. Example:New Yorkstatestring optional - The state on the billing address. Example:NYpostal_codestring optional - The postal/zip code on the billing address. Example:10001countrystring optional - The country on the billing address. Example:US
shipping_addressstring[] optional - Customer's shipping address details.labelstring optional - The label describing the shipping address. Example:Shippingfirst_namestring optional - The first name on the shipping address. Example:Johnlast_namestring optional - The last name on the shipping address. Example:Doephonestring optional - The phone number on the shipping address. Example:+1-555-123-4567companystring optional - The company on the shipping address. Example:Acme Inc.address1string optional - The shipping street address. Example:123 Main Staddress2string optional - Additional shipping address line. Example:Apt 4Bcitystring optional - The city on the shipping address. Example:New Yorkstatestring optional - The state on the shipping address. Example:NYpostal_codestring optional - The postal/zip code on the shipping address. Example:10001countrystring optional - The country on the shipping address. Example:US
userstring[] optional - Details about the connected user, if applicable.idmixed optional - The user's ID in the source system. Numeric values will be cast to strings. Example:user_123usernamestring optional - The user's username. Example:johndoeemailstring optional - The user's email address. Example:[email protected]first_namestring optional - The user's first name. Example:Johnlast_namestring optional - The user's last name. Example:Doedisplay_namestring optional - The user's display name. Example:John Doerolestring optional - The user's role in the system. Example:customercreated_atstring optional - When the user was created. Example:2024-03-21T15:30:00Zmodified_atstring optional - When the user was last modified. Example:2024-03-21T15:30:00Zurlstring optional - URL to the user's profile.- Example:
https://store.example.com/users/123
- Example:
avatar_urlstring optional - URL to the user's avatar/profile image.- Example:
https://store.example.com/avatars/john-doe.jpg
- Example:
statusstring optional - User status. Example:activelast_loginstring optional - When the user last logged in. Example:2024-03-21T15:30:00Z
planstring optional - Subscription plan details. Example:Premiumplan_namestring optional - Name of the subscription plan. Example:Premium Planplan_idmixed optional - ID of the subscription plan. Numeric values will be cast to strings. Example:plan_123plan_amountnumber optional - Cost of the subscription plan. Example:19.99plan_intervalstring optional - Billing interval (month, year, etc.). Example:monthplan_interval_countinteger optional - Number of intervals between billings. Example:1subscriptionsstring[] optional - Array of subscription details for customers with multiple subscriptions.Item
*object Propertiesplanstring optional - Subscription plan details. Example:Premiumplan_namestring optional - Name of the subscription plan. Example:Premium Planplan_idmixed optional - ID of the subscription plan. Numeric values will be cast to strings. Example:plan_123plan_amountnumber optional - Cost of the subscription plan. Example:19.99plan_intervalstring optional - Billing interval (month, year, etc.). Example:monthplan_interval_countinteger optional - Number of intervals between billings. Example:1statusstring optional - Status of the subscription (active, canceled, etc.). Example:activestart_datestring optional - When the subscription started. Example:2024-03-21T15:30:00Zend_datestring optional - When the subscription ends/ended. Example:2025-03-21T15:30:00Ztrial_end_datestring optional - When the trial period ends/ended. Example:2024-04-21T15:30:00Zcanceled_atstring optional - When the subscription was canceled. Example:2024-05-21T15:30:00Zcurrencystring optional - Currency code for the subscription amounts. Example:USD
silentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no customer event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events/customer/created" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"woocommerce\",
\"id\": \"cust_123456\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"name\": \"John Doe\",
\"customer_email\": \"[email protected]\",
\"status\": \"active\",
\"created_at\": \"2024-03-21T15:30:00Z\",
\"modified_at\": \"2024-03-21T15:30:00Z\",
\"user_id\": \"user_123\",
\"purchase_count\": 5,
\"purchase_value\": 299.95,
\"phone\": \"+1-555-123-4567\",
\"url\": \"https:\\/\\/store.example.com\\/customers\\/123\",
\"avatar_url\": \"https:\\/\\/store.example.com\\/avatars\\/john-doe.jpg\",
\"currency\": \"USD\",
\"payment_gateway\": \"stripe\",
\"public_id\": \"pub_123456\",
\"crm\": \"woocommerce\",
\"plan\": \"Premium\",
\"plan_name\": \"Premium Plan\",
\"plan_id\": \"plan_123\",
\"plan_amount\": 19.99,
\"plan_interval\": \"month\",
\"plan_interval_count\": 1,
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events/customer/created';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'woocommerce',
'id' => 'cust_123456',
'first_name' => 'John',
'last_name' => 'Doe',
'name' => 'John Doe',
'customer_email' => '[email protected]',
'status' => 'active',
'created_at' => '2024-03-21T15:30:00Z',
'modified_at' => '2024-03-21T15:30:00Z',
'user_id' => 'user_123',
'purchase_count' => 5,
'purchase_value' => 299.95,
'phone' => '+1-555-123-4567',
'url' => 'https://store.example.com/customers/123',
'avatar_url' => 'https://store.example.com/avatars/john-doe.jpg',
'currency' => 'USD',
'payment_gateway' => 'stripe',
'public_id' => 'pub_123456',
'crm' => 'woocommerce',
'plan' => 'Premium',
'plan_name' => 'Premium Plan',
'plan_id' => 'plan_123',
'plan_amount' => 19.99,
'plan_interval' => 'month',
'plan_interval_count' => 1,
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events/customer/created"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "woocommerce",
"id": "cust_123456",
"first_name": "John",
"last_name": "Doe",
"name": "John Doe",
"customer_email": "[email protected]",
"status": "active",
"created_at": "2024-03-21T15:30:00Z",
"modified_at": "2024-03-21T15:30:00Z",
"user_id": "user_123",
"purchase_count": 5,
"purchase_value": 299.95,
"phone": "+1-555-123-4567",
"url": "https:\/\/store.example.com\/customers\/123",
"avatar_url": "https:\/\/store.example.com\/avatars\/john-doe.jpg",
"currency": "USD",
"payment_gateway": "stripe",
"public_id": "pub_123456",
"crm": "woocommerce",
"plan": "Premium",
"plan_name": "Premium Plan",
"plan_id": "plan_123",
"plan_amount": 19.99,
"plan_interval": "month",
"plan_interval_count": 1,
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"source": [
"The source field is required."
],
"id": [
"The id field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}Track a user event
POSTapi/events/user/{action}For tracking user lifecycle events
URL Parameters
actionstring required - The user event action to track. Example:created- Must be one of:
createdupdateddeleted
- Must be one of:
Request Body
emailstring optional - The user's email address. Example:[email protected]referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The platform source. Example:wordpressidmixed required - The unique identifier for the user. Numeric values will be cast to strings. Example:user_123456is_contactboolean optional - If true, the user will be synced to contacts. Example:trueusernamestring optional - The username. Example:johndoefirst_namestring optional - The user's first name. Example:Johnlast_namestring optional - The user's last name. Example:Doedisplay_namestring optional - The user's display name. Example:John Doerolestring optional - The user's role. Example:subscriberurlstring optional - The URL to the user's profile.- Example:
https://example.com/users/johndoe
- Example:
avatar_urlstring optional - The URL to the user's avatar image.- Example:
https://example.com/avatars/johndoe.jpg
- Example:
statusstring optional - The user's status. Example:activecreated_atstring optional - When the user was created. Example:2024-03-21T15:30:00Zmodified_atstring optional - When the user was last modified. Example:2024-03-21T15:30:00Zdeleted_atstring optional - When the user was deleted. Example:2024-03-21T15:30:00Zlast_loginstring optional - When the user last logged in. Example:2024-03-21T15:30:00Zsilentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no user event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events/user/created" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"email\": \"[email protected]\",
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"wordpress\",
\"id\": \"user_123456\",
\"is_contact\": true,
\"username\": \"johndoe\",
\"first_name\": \"John\",
\"last_name\": \"Doe\",
\"display_name\": \"John Doe\",
\"role\": \"subscriber\",
\"url\": \"https:\\/\\/example.com\\/users\\/johndoe\",
\"avatar_url\": \"https:\\/\\/example.com\\/avatars\\/johndoe.jpg\",
\"status\": \"active\",
\"created_at\": \"2024-03-21T15:30:00Z\",
\"modified_at\": \"2024-03-21T15:30:00Z\",
\"deleted_at\": \"2024-03-21T15:30:00Z\",
\"last_login\": \"2024-03-21T15:30:00Z\",
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events/user/created';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'email' => '[email protected]',
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'wordpress',
'id' => 'user_123456',
'is_contact' => true,
'username' => 'johndoe',
'first_name' => 'John',
'last_name' => 'Doe',
'display_name' => 'John Doe',
'role' => 'subscriber',
'url' => 'https://example.com/users/johndoe',
'avatar_url' => 'https://example.com/avatars/johndoe.jpg',
'status' => 'active',
'created_at' => '2024-03-21T15:30:00Z',
'modified_at' => '2024-03-21T15:30:00Z',
'deleted_at' => '2024-03-21T15:30:00Z',
'last_login' => '2024-03-21T15:30:00Z',
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events/user/created"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "[email protected]",
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "wordpress",
"id": "user_123456",
"is_contact": true,
"username": "johndoe",
"first_name": "John",
"last_name": "Doe",
"display_name": "John Doe",
"role": "subscriber",
"url": "https:\/\/example.com\/users\/johndoe",
"avatar_url": "https:\/\/example.com\/avatars\/johndoe.jpg",
"status": "active",
"created_at": "2024-03-21T15:30:00Z",
"modified_at": "2024-03-21T15:30:00Z",
"deleted_at": "2024-03-21T15:30:00Z",
"last_login": "2024-03-21T15:30:00Z",
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"source": [
"The source field is required."
],
"id": [
"The id field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}Track a subscription event
POSTapi/events/subscription/{action}For tracking subscription lifecycle events
URL Parameters
actionstring required - The subscription event action to track. Example:created- Must be one of:
createdupdateddeletedrenewedcancelledexpiredrenewal_failed
- Must be one of:
Request Body
emailstring optional - The person's email address. Either email or referenceId must be provided.referenceIdmixed optional - The person's unique identifier. Either email or referenceId must be provided. Numeric values will be cast to strings. Example:cust_123456uuidstring optional - The uuid from a previous event response. Can be used instead of email or referenceId.- Example:
318835f4-f968-4894-9847-358399823d6c
- Example:
sourcestring required - The platform source. Example:woocommerceidmixed required - The unique identifier for the subscription. Numeric values will be cast to strings. Example:sub_123456urlstring optional - The URL to the subscription.- Example:
https://store.example.com/my-account/subscriptions/123456
- Example:
currencystring optional - The three-letter ISO currency code. Example:USDproductsobject[] optional - The products associated with the subscription.Item
*object Propertiesidmixed required - The unique identifier for the product. Numeric values will be cast to strings. Example:prod_123namestring required - The name of the product. Example:Awesome T-Shirturlstring optional - A URL to the site containing the product details.- Example:
https://store.example.com/products/awesome-tshirt
- Example:
image_urlstring optional - A direct URL to an image of the product.- Example:
https://store.example.com/images/awesome-tshirt.jpg
- Example:
variant_idmixed optional - The unique identifier for the variant of the product. Numeric values will be cast to strings. Example:var_123brandstring optional - The brand name for the product. Example:Awesome Brandpricenumber optional - The price of the product. Example:29.99quantityinteger optional - The quantity of the product ordered. Example:2totalnumber optional - The line item total after all calculations. Example:59.98discountsnumber optional - The total discounts applied to this product. Example:10taxesnumber optional - The total taxes for this product. Example:5feesnumber optional - The total fees for this product. Example:2shippingnumber optional - The total shipping for this product. Example:5
silentboolean optional - If true, no workflow automations will be triggered, but the event will be stored. Example:truetestboolean optional - If true, no subscription event will be added but response will be returned. Useful for testing the event properties without storing the event. Response is representative only. Example:true
Request
bash
curl --request POST \
"https://api.lindris.com/api/events/subscription/created" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"referenceId\": \"cust_123456\",
\"uuid\": \"318835f4-f968-4894-9847-358399823d6c\",
\"source\": \"woocommerce\",
\"id\": \"sub_123456\",
\"url\": \"https:\\/\\/store.example.com\\/my-account\\/subscriptions\\/123456\",
\"currency\": \"USD\",
\"silent\": true,
\"test\": true
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/events/subscription/created';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => [
'referenceId' => 'cust_123456',
'uuid' => '318835f4-f968-4894-9847-358399823d6c',
'source' => 'woocommerce',
'id' => 'sub_123456',
'url' => 'https://store.example.com/my-account/subscriptions/123456',
'currency' => 'USD',
'silent' => true,
'test' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/events/subscription/created"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"referenceId": "cust_123456",
"uuid": "318835f4-f968-4894-9847-358399823d6c",
"source": "woocommerce",
"id": "sub_123456",
"url": "https:\/\/store.example.com\/my-account\/subscriptions\/123456",
"currency": "USD",
"silent": true,
"test": true
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"success": true,
"timestamp": 1710969645
}json
{
"message": "The given data was invalid.",
"errors": {
"source": [
"The source field is required."
],
"id": [
"The id field is required."
],
"email": [
"The email field is required when reference id is not present."
]
}
}