LianaMailer REST API

Properties

Server

Store extra information about contacts, such as a name or a customer number. All mailing lists in your account share the same properties. Create, rename and delete properties. Some property names are reserved.


Get properties

POST
https://rest.lianamailer.com/api
/v1/getCustomerProperties

Returns the contact properties of your account with the language FI, with their handles (property IDs), types, choices and settings. Properties with another language or without one are not listed. Any parameters are ignored.

Get properties › Responses

OK

succeed
​boolean

Response status.

Example: true

Create property

POST
https://rest.lianamailer.com/api
/v1/createCustomerProperty

Creates a contact property and returns its handle (property ID). If a property with the same name already exists, its settings are replaced with the given ones and its handle is returned. Give language: "FI": a property created without a language is not listed by getCustomerProperties or shown in the LianaMailer UI.

Property name restrictions apply here.

Create property › Request Body

name
​PropertyName · required

Property name.

Example: Example name
language
​PropertyLanguage · required

Property language code. Use FI, the language of normal properties: the value is used as given, not upper-cased, and leaving it out means no language. A property without a language is not listed by getCustomerProperties or shown in the LianaMailer UI.

Example: FI
type
​PropertyType · enum

Property input type. Defaults to text.

Enum values:
text
numeric
select
checkbox
Example: text
choices
​string[]

Allowed values for select and checkbox properties.

Example: ["selection-1","selection-2"]
required
​PropertyRequired

Whether the property is required on the subscription page.

Example: true
subscription
​PropertySubscription

Whether the property is shown on the subscription page.

Example: true
position
​PropertyPosition

Display position of the property.

Example: 1
datatype
​PropertyDataType · enum

Data type of the property values. Defaults to text.

Enum values:
text
datetime
numeric
Example: text
hidden_from_ui
​boolean

Whether the property is hidden in the LianaMailer UI. Defaults to false.

Example: false

Create property › Responses

OK

succeed
​boolean

Response status.

Example: true

Property handle. See getCustomerProperties.

Example: 123

Rename property

POST
https://rest.lianamailer.com/api
/v1/renameCustomerProperty

Renames a contact property. Contacts' values for the property are kept. Returns an error if another property already has the new name. Give language: "FI" for normal properties: without it, the property is not found.

Property name restrictions apply here.

Rename property › Request Body

oldname
​PropertyNameOld · required

Current property name.

Example: Example name
newname
​PropertyNameNew · required

New property name.

Example: Example name
language
​PropertyLanguage · required

Property language code. Use FI, the language of normal properties: the value is used as given, not upper-cased, and leaving it out means no language. A property without a language is not listed by getCustomerProperties or shown in the LianaMailer UI.

Example: FI

Rename property › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​string | null

Returns null.

Example: null

Delete property

POST
https://rest.lianamailer.com/api
/v1/deleteCustomerProperty

Deletes a contact property together with all contacts' values for it. This cannot be undone. Give language: "FI" for normal properties: without it, the property is not found.

Delete property › Request Body

name
​PropertyName · required

Property name.

Example: Example name
language
​PropertyLanguage · required

Property language code. Use FI, the language of normal properties: the value is used as given, not upper-cased, and leaving it out means no language. A property without a language is not listed by getCustomerProperties or shown in the LianaMailer UI.

Example: FI

Delete property › Responses

OK

succeed
​boolean

Response status.

Example: true
result
​string | null

Returns null.

Example: null