Template Folders

This endpoint allows a user to manage their folders in order to organize the various templates they own.

The following fields relate to the Template Folders endpoint.

FieldLimitsRequired?Writeable?
id
NoNo

The ID of the template folder

user_id
Automatically set as the submitter's id
NoNo

The owning user ID of the template folder

name
200 characters
YesYes
description
200 characters
NoYes
original_template_folder_id
NoNo

This ID represents the original template folder from which this template folder was shared. When a template folder is shared, the folder and the templates it contains are duplicated for the target user.

counts
NoNo

The count for each template type in the folder

Submit one Template Folder

To submit one template folder:

POST https://api-v2.liondesk.com//template-folders headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The request object should have this form:{ "name": "Closed Clients Drip", "description": "Templates for clients that have been closed, and have bought a property." }

Update one Template Folder

To update some attributes on one template folder:

PATCH https://api-v2.liondesk.com//template-folders/10 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

data: {
name: "Closed Clients Drip",
description: "Templates for clients that have been closed, and have bought a property."
}

Get One Template Folder

To get one template folder:

GET https://api-v2.liondesk.com//template-folders/1 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The response object will have this form:{ "id": 1, "user_id": 1, "name": "Closed Clients Drip", "description": "Templates for clients that have been closed, and have bought a property.", "original_template_folder_id": 1, "counts": { "counts": { "Email": 2, "Text": 1, "Phone": 0, "Direct Mail Letter": 0, "Direct Mail Postcard": 0 } } }

Find All Template Folders

You find/search template folders by issuing a GET request to the base endpoint:

GET https://api-v2.liondesk.com//template-folders headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

The response will contain an array of template folder objects, like so:

{ "total": 2, "limit": 10, "skip": 0, "data": [ { "id": 1, "user_id": 1, "name": "Closed Clients Drip", "description": "Templates for clients that have been closed, and have bought a property.", "original_template_folder_id": 1, "counts": { "counts": { "Email": 2, "Text": 1, "Phone": 0, "Direct Mail Letter": 0, "Direct Mail Postcard": 0 } } }, { "id": 3, "user_id": 1, "name": "General Buyer Drip", "description": "Templates for clients who are potentially looking to buy.", "original_template_folder_id": 3, "counts": { "counts": { "Email": 2, "Text": 1, "Phone": 2, "Direct Mail Letter": 0, "Direct Mail Postcard": 1 } } } ] }

Filtering Template Folders

The following filtering operators may be mixed and matched as desired.

Equality

You may query template folder fields directly by specifying equality parameters in the request URI:GET /template-folders?name=LionDesk Buyers Drip&name=LionDesk Closed Drips

You may wish to exclude results having some value with $ne:GET /template-folders?name[$ne]=LionDesk Buyers Drip&name[$ne]=LionDesk Closed Drips

Limiting and Pagination

$limit will return only the number of results you specify: GET /template-folders?$limit=2

$skip will skip the specified number of results, useful for paginating:GET /template-folders?name=LionDesk Buyers Drip&name=LionDesk Closed Drips&$limit=2&$skip=2

Sorting

$sort will order results based on the field given.

Use 1 for ascending order, and -1 for descending order:GET /template-folders?$limit=10&$sort[name]=-1

Inclusion / Exclusion

Find all records where the property values are ($in) some set:GET /template-folders?name[$in]=LionDesk Buyers Drip&name[$in]=LionDesk Closed DripsIf the column matches any of the given values, the resource shall be returned.

Similarly, you may exclude certain values with ($nin):GET /template-folders?name[$nin]=LionDesk Buyers Drip&name[$nin]=LionDesk Closed Drips

Remove

Template Folders can be removed with a delete request.

DELETE https://api-v2.liondesk.com//template-folders/76 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }