HTTPS API v2 / Template management
The system allows remote letters, add, edit and delete message templates.
Listing template
Calling address
For using the remote operating list the templates, you must call the specified URL using the POST method.
templates/index
Available parameters
Parameter | Type | An example value or format | Description |
---|---|---|---|
username | String | Login | Username to the account |
password | String | Password | Password to the account |
sort | String | name |
An optional parameter that allows sorting by name template. |
order | String | asc|desc | An optional parameter you can change the sort order. |
The parameters in bold are obligatory. Others are optional.
Return response
{
"items":[{
"id":8416,
"name":"Tytuł szablonu 1",
"text":"Treść wiadomości"
},
{
"id":8415,
"name":"Tytuł szablonu 2",
"text":"Wiadomość testowa"
}]
}
Displaying a single template
Calling address
For using the remote operating display template, call the specified URL using the POST method.
templates/view
Available parameters
Parameter | Type | An example value or format | Description |
---|---|---|---|
username | String | Login | Username to the account |
password | String | Password | Password to the account |
id | Integer | eg. 4886 | ID template |
The parameters in bold are obligatory. Others are optional.
Return response
{
"id":8416,
"name":"Tytuł szablonu 1",
"text":"Treść wiadomości"
}
Adding a new template
Calling address
For using the remote operating to create a new template, call the specified URL using the POST method.
templates/add
Available parameters
Parameter | Type | An example value or format | Description |
---|---|---|---|
username | String | Login | Username to the account |
password | String | Password | Password to the account |
name | String | Template name |
Name of the template. |
text | String | text |
Message content |
The parameters in bold are obligatory. Others are optional.
Return response
{
"success":true,
"id":12354
}
Edit template
Calling address
For using the remote operating to edit the template, call the specified URL using the POST method.
templates/edit
Available parameters
Parameter | Type | An example value or format | Description |
---|---|---|---|
username | String | Login | Username to the account |
password | String | Password | Password to the account |
id | Integer | eg. 8465 | ID template |
name | String | Template name | Name of the template. |
text | String | text | Message content |
The parameters in bold are obligatory. Others are optional.
Return response
{
"success":true,
"id":12354
}
Delete template
Calling address
For using the remote operation to remove a template, call the specified URL using the POST method.
templates/delete
Available parameters
Parameter | Type | An example value or format | Description |
---|---|---|---|
username | String | Login | Username to the account |
password | String | Haslo | Password to the account |
id | String | np. 7584 | ID template |
The parameters in bold are obligatory. Others are optional.
Return response
{
"success":true
}