Lodol Docs

Lists

API actions for the Lists integration.

Lists

Count, sort, add, remove, and clean up lists.


Add item to end

Add an item to the end of a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
valueobjectYes

Response

{
  "status": "success"
}

Create a list

Create a list by entering its items one by one.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Filter list

Keep only the items in a list that match a condition, and return them as a new list. Build the condition the same way as an “If” step, referring to the current item as “item”.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
conditionstringYesOnly items for which this is true are kept. Refer to the current item as “item” (for example, item.price is greater than 100).

Response

{
  "status": "success"
}

Get first item

Get the first item of a list. If the list is empty, returns an empty list (shown as “Empty list”).

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Find item position

Find where an item appears in a list. Returns -1 if it is not found.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
valueobjectYes

Response

{
  "status": "success"
}

Insert item

Add an item at a specific position in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
indexnumberYes0 is the first item.
valueobjectYes

Response

{
  "status": "success"
}

Get last item

Get the last item of a list. If the list is empty, returns an empty list (shown as “Empty list”).

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Count items

Count how many items are in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Check if list includes item

Check whether a list includes a specific item.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
valueobjectYes

Response

{
  "status": "success"
}

Combine two lists

Merge two lists into one, keeping the items of the first list followed by the items of the second.

Parameters

ParameterTypeRequiredDescription
firstarrayYes
secondarrayYes

Response

{
  "status": "success"
}

Remove item by position

Remove the item at a specific position in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
indexnumberYes0 is the first item.

Response

{
  "status": "success"
}

Remove duplicates

Remove repeated items from a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Reverse list

Reverse the order of items in a list.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Shuffle list

Put the items of a list in a random order. Returns all of the items, just reordered.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes

Response

{
  "status": "success"
}

Take part of list

Take a section of a list, such as the first five items or the last three.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
startnumberYesThis item is included. Use a negative number to count from the end (-1 is the last item).
endnumberNoThis item is not included. Leave blank to go through the end of the list. Use a negative number to count from the end (-1 is the last item).

Response

{
  "status": "success"
}

Sort list

Sort a list in ascending (first/smallest to last/largest) or descending (last/largest to first/smallest) order.

Parameters

ParameterTypeRequiredDescription
itemsarrayYes
directionstringNoThe order to sort in.

Response

{
  "status": "success"
}

On this page