Definitions API - en
Using this API, you can view, add, get, edit and delete global variables in a project.
Reading.
Allows you to view the created global variables in the project.
GET https://api.smartsender.com/v1/definitions
Main parameters:
Name | Description | Validation |
---|---|---|
page | Requested page | Minimum value 1 |
limitation | Amount of data to display per page | Minimum value 1, maximum 20 |
term | Search string |
|
If the response is successful, you will receive the following:
{
"cursor": Cursor,
"collection": Definition[]
}
Answer description:
Name | Описание |
---|---|
cursor | Cursor object |
collection | Array of Definition objects |
Creation.
Allows you to create a new global variable in the project.
POST https://api.smartsender.com/v1/definitions
Main parameters:
Name | Description | Validation |
---|---|---|
name | name | Unique within the project |
value | value | String|Integer |
If the response is successful, receive the created Definition object.
Receipt.
Allows you to get an existing global variable in the project.
GET https://api.smartsender.com/v1/definitions/{definitionId}
If the response is successful, receive the created Definition object.
Update.
Allows you to update an existing global variable.
PUT https://api.smartsender.com/v1/definitions/{definitionId}
Main parameters:
Name | Description |
---|---|
name | Unique within the project |
value | String|Integer |
If the response is successful, you will receive the following:
{
"state": true
}
Delete.
Allows you to delete an existing global variable.
DELETE https://api.smartsender.com/v1/definitions/{definitionId}
If the response is successful, you will receive the following:
{
"state": true
}