Creating a group parameter
Example of json data for an HTTP request:
{
"title":"Age",
"kind": "numeric"
}
Example of http request:
curl -X POST https://api.msndr.net/v1/email/lists/1/parameters \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $API_TOKEN' \
-d '...JSON...'
Uses POST method and /email/lists/:id/parameters
Successful response:
{
"id":11,
"title":"Age",
"kind":"numeric",
"list_id":15
}
Parameters of the request:
Parameter |
Description |
Required |
title |
yes |
|
kind |
Possible values: |
The following is a description of the attributes in the json response:
Attribute |
Description |
id |
identifier |
title |
name |
kind |
type |
Getting the list of group parameters
Example of HTTP request:
curl -X GET https://api.msndr.net/v1/email/lists/1/parameters \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $API_TOKEN'
Uses GET method; supports paginated output
The link email/lists/:id/parameters
Where id is the identifier of the group for which we want to get the list of parameters
Successful response:
{
"total_count":2,
"total_pages":1,
"page_number":1,
"page_size":25,
"collection":[
{
"id":1,
"title":"Name",
"kind":"string",
"list_id":1
},
{
"id":2,
"title":"Age",
"kind":"numeric",
"list_id":1
}
]
}
The server response is a collection of parameters for this group. Each element of the collection contains attributes described in the table below:
Attribute |
Description |
id |
identifier |
title |
name |
kind |
type |
Changing group parameters
Example of json data for an HTTP request:
{
"title":"Age",
"kind": "numeric"
}
Example of an HTTP request:
curl -X PATCH https://api.msndr.net/v1/email/lists/11/parameters/15 \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $API_TOKEN' \
-d '...JSON...'
Uses PATCH method and /email/lists/:list-id/parameters/:id link
where :list-id is the unique identifier of the group, :id is the identifier of the group parameter
Successful HTTP request:
{
"id":11,
"title":"Age",
"kind":"numeric",
"list_id":15
}
Parameter |
Description |
Required |
title |
||
kind |
Possible values: |
json server response to HTTP request:
Attribite |
Description |
id |
identifier |
title |
name |
kind |
type |
Deleting a parameter from a group
Example of an HTTP request:
curl -X DELETE https://api.msndr.net/v1/email/lists/11/parameters/15 \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $API_TOKEN'
Uses DELETE and /email/lists/:list-id/parameters/:id
where :list-id is a unique group identifier, :id is a parameter identifier